Namespaces - List Keys

Hiermee haalt u de primaire en secundaire verbindingsreeksen op naar de naamruimte.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys?api-version=2023-09-01

URI-parameters

Name In Vereist Type Description
authorizationRuleName
path True

string

Naam van autorisatieregel

Regex pattern: ^[a-zA-Z0-9!()*-._]+$

namespaceName
path True

string

Naam van naamruimte

Regex pattern: ^[a-zA-Z][a-zA-Z0-9-]*$

resourceGroupName
path True

string

De naam van de resourcegroep. De naam is niet hoofdlettergevoelig.

subscriptionId
path True

string

uuid

De id van het doelabonnement. De waarde moet een UUID zijn.

api-version
query True

string

De API-versie die voor deze bewerking moet worden gebruikt.

Antwoorden

Name Type Description
200 OK

ResourceListKeys

Geslaagd

Other Status Codes

ErrorResponse

Foutcode met reden.

Beveiliging

azure_auth

Azure Active Directory OAuth2-stroom

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation uw gebruikersaccount imiteren

Voorbeelden

Namespaces_ListKeys

Sample Request

POST https://management.azure.com/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-09-01

Sample Response

{
  "primaryConnectionString": "Endpoint=sb://nh-sdk-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################",
  "secondaryConnectionString": "Endpoint=sb://nh-sdk-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################",
  "primaryKey": "############################################",
  "secondaryKey": "############################################",
  "keyName": "RootManageSharedAccessKey"
}

Definities

Name Description
ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Foutreactie

ResourceListKeys

Antwoord voor de POST-aanvraag die naamruimte of NotificationHub-toegangssleutels (verbindingsreeksen) retourneert.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

object

De aanvullende informatie.

type

string

Het type aanvullende informatie.

ErrorDetail

De foutdetails.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

Aanvullende informatie over de fout.

code

string

De foutcode.

details

ErrorDetail[]

De foutdetails.

message

string

Het foutbericht.

target

string

Het foutdoel.

ErrorResponse

Foutreactie

Name Type Description
error

ErrorDetail

Het foutobject.

ResourceListKeys

Antwoord voor de POST-aanvraag die naamruimte of NotificationHub-toegangssleutels (verbindingsreeksen) retourneert.

Name Type Description
keyName

string

Hiermee wordt de keyName van de gemaakte AuthorizationRule opgehaald of ingesteld

primaryConnectionString

string

Hiermee wordt de primaryConnectionString van de AuthorizationRule opgehaald of ingesteld.

primaryKey

string

Hiermee wordt de primaryKey van de gemaakte AuthorizationRule opgehaald of ingesteld.

secondaryConnectionString

string

Hiermee wordt de secondaryConnectionString van de gemaakte AuthorizationRule opgehaald of ingesteld

secondaryKey

string

Hiermee wordt de secondaryKey van de gemaakte AuthorizationRule opgehaald of ingesteld