Delen via


Namespaces - List Keys

Hiermee haalt u de primaire en secundaire ConnectionStrings 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

minLength: 1
maxLength: 256
pattern: ^[a-zA-Z0-9!()*-._]+$

Naam van autorisatieregel

namespaceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z][a-zA-Z0-9-]*$

Naam van de naamruimte

resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

minLength: 1

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
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

Namespaces_ListKeys

Voorbeeldaanvraag

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

Voorbeeldrespons

{
  "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 extra informatietype.

ErrorDetail

De foutdetails.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

De fout bevat aanvullende informatie.

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 haalt u keyName van de gemaakte AuthorizationRule op of stelt u deze in

primaryConnectionString

string

Hiermee haalt u primaryConnectionString van authorizationRule op of stelt u deze in.

primaryKey

string

Hiermee haalt u primaryKey van de gemaakte AuthorizationRule op of stelt u deze in.

secondaryConnectionString

string

Hiermee haalt u secondaryConnectionString van de gemaakte AuthorizationRule op of stelt u deze in

secondaryKey

string

Hiermee haalt u secundaire sleutel van de gemaakte AuthorizationRule op of stelt u deze in