Kuyruğa birincil ve ikincil bağlantı dizeleri.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName}/ListKeys?api-version=2021-11-01
URI Parametreleri
Name |
İçinde |
Gerekli |
Tür |
Description |
authorizationRuleName
|
path |
True
|
string
|
Yetkilendirme kuralı adı.
|
namespaceName
|
path |
True
|
string
|
Ad alanı adı
|
queueName
|
path |
True
|
string
|
Kuyruk adı.
|
resourceGroupName
|
path |
True
|
string
|
Azure aboneliğindeki Kaynak grubunun adı.
|
subscriptionId
|
path |
True
|
string
|
Microsoft Azure aboneliğini benzersiz olarak tanımlayan abonelik kimlik bilgileri. Abonelik kimliği, her hizmet çağrısı için URI'nin bir parçasını oluşturur.
|
api-version
|
query |
True
|
string
|
İstemci API sürümü.
|
Yanıtlar
Name |
Tür |
Description |
200 OK
|
AccessKeys
|
Bağlantı dizeleri başarıyla döndürüldü.
|
Other Status Codes
|
ErrorResponse
|
İşlemin neden başarısız olduğunu açıklayan ServiceBus hata yanıtı.
|
Güvenlik
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
QueueAuthorizationRuleListKey
Sample Request
POST https://management.azure.com/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-namespace-7982/queues/sdk-Queues-2317/authorizationRules/sdk-AuthRules-5800/ListKeys?api-version=2021-11-01
import com.azure.core.util.Context;
/** Samples for Queues ListKeys. */
public final class Main {
/*
* x-ms-original-file:
* specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/
* SBQueueAuthorizationRuleListKey.json
*/
/**
* Sample code: QueueAuthorizationRuleListKey.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void queueAuthorizationRuleListKey(com.azure.resourcemanager.AzureResourceManager azure) {
azure.serviceBusNamespaces().manager().serviceClient().getQueues().listKeysWithResponse("ArunMonocle",
"sdk-namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.servicebus import ServiceBusManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-servicebus
# USAGE
python sb_queue_authorization_rule_list_key.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ServiceBusManagementClient(
credential=DefaultAzureCredential(),
subscription_id="5f750a97-50d9-4e36-8081-c9ee4c0210d4",
)
response = client.queues.list_keys(
resource_group_name="ArunMonocle",
namespace_name="sdk-namespace-7982",
queue_name="sdk-Queues-2317",
authorization_rule_name="sdk-AuthRules-5800",
)
print(response)
# x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleListKey.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armservicebus_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleListKey.json
func ExampleQueuesClient_ListKeys() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armservicebus.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewQueuesClient().ListKeys(ctx, "ArunMonocle", "sdk-namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccessKeys = armservicebus.AccessKeys{
// KeyName: to.Ptr("sdk-AuthRules-5800"),
// PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"),
// PrimaryKey: to.Ptr("############################################"),
// SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"),
// SecondaryKey: to.Ptr("############################################"),
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Primary and secondary connection strings to the queue.
*
* @summary Primary and secondary connection strings to the queue.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2021-11-01/examples/Queues/SBQueueAuthorizationRuleListKey.json
*/
async function queueAuthorizationRuleListKey() {
const subscriptionId = "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = "ArunMonocle";
const namespaceName = "sdk-namespace-7982";
const queueName = "sdk-Queues-2317";
const authorizationRuleName = "sdk-AuthRules-5800";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.listKeys(
resourceGroupName,
namespaceName,
queueName,
authorizationRuleName
);
console.log(result);
}
queueAuthorizationRuleListKey().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"primaryConnectionString": "Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317",
"secondaryConnectionString": "Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317",
"primaryKey": "############################################",
"secondaryKey": "############################################",
"keyName": "sdk-AuthRules-5800"
}
Tanımlar
AccessKeys
Namespace/ServiceBus Bağlantı Dizesi
Name |
Tür |
Description |
aliasPrimaryConnectionString
|
string
|
GEO DR etkinse diğer adın birincil bağlantı dizesi
|
aliasSecondaryConnectionString
|
string
|
GEO DR etkinse diğer adın ikincil bağlantı dizesi
|
keyName
|
string
|
Yetkilendirme kuralını açıklayan bir dize.
|
primaryConnectionString
|
string
|
Oluşturulan ad alanı yetkilendirme kuralının birincil bağlantı dizesi.
|
primaryKey
|
string
|
SAS belirtecini imzalamak ve doğrulamak için base64 ile kodlanmış 256 bit birincil anahtar.
|
secondaryConnectionString
|
string
|
Oluşturulan ad alanı yetkilendirme kuralının ikincil bağlantı dizesi.
|
secondaryKey
|
string
|
SAS belirtecini imzalamak ve doğrulamak için base64 ile kodlanmış 256 bit birincil anahtar.
|
Error
Hata nesnesi.
Name |
Tür |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Hata ek bilgileri.
|
code
|
string
|
Hata kodu.
|
details
|
ErrorResponse[]
|
Hata ayrıntıları.
|
message
|
string
|
Hata iletisi.
|
target
|
string
|
Hata hedefi.
|
ErrorAdditionalInfo
Kaynak yönetimi hatası ek bilgileri.
Name |
Tür |
Description |
info
|
object
|
Ek bilgiler.
|
type
|
string
|
Ek bilgi türü.
|
ErrorResponse
Kaynak yönetimi hata yanıtı.
Name |
Tür |
Description |
error
|
Error
|
Hata nesnesi.
|