Namespaces - List Keys

Lekéri az elsődleges és másodlagos ConnectionStrings elemet a névtérbe.

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

URI-paraméterek

Name In Kötelező Típus Description
authorizationRuleName
path True

string

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

Engedélyezési szabály neve

namespaceName
path True

string

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

Névtér neve

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket.

subscriptionId
path True

string (uuid)

A cél-előfizetés azonosítója. Az értéknek UUID-nek kell lennie.

api-version
query True

string

minLength: 1

A művelethez használni kívánt API-verzió.

Válaszok

Name Típus Description
200 OK

ResourceListKeys

Siker

Other Status Codes

ErrorResponse

Hibakód okokkal.

Biztonság

azure_auth

Azure Active Directory OAuth2-folyamat

Típus: oauth2
Folyamat: implicit
Engedélyezési URL: https://login.microsoftonline.com/common/oauth2/authorize

Hatókörök

Name Description
user_impersonation a felhasználói fiók megszemélyesítése

Példák

Namespaces_ListKeys

Mintakérelem

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

Mintaválasz

{
  "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"
}

Definíciók

Name Description
ErrorAdditionalInfo

Az erőforrás-kezelési hiba további információi.

ErrorDetail

A hiba részletei.

ErrorResponse

Hibaválasz

ResourceListKeys

Válasz a névteret vagy NotificationHub hozzáférési kulcsokat (kapcsolati sztringeket) tartalmazó POST-kérelemre.

ErrorAdditionalInfo

Az erőforrás-kezelési hiba további információi.

Name Típus Description
info

object

A további információk.

type

string

A további információtípus.

ErrorDetail

A hiba részletei.

Name Típus Description
additionalInfo

ErrorAdditionalInfo[]

A hiba további információi.

code

string

A hibakód.

details

ErrorDetail[]

A hiba részletei.

message

string

A hibaüzenet.

target

string

A hibacél.

ErrorResponse

Hibaválasz

Name Típus Description
error

ErrorDetail

A hibaobjektum.

ResourceListKeys

Válasz a névteret vagy NotificationHub hozzáférési kulcsokat (kapcsolati sztringeket) tartalmazó POST-kérelemre.

Name Típus Description
keyName

string

Lekéri vagy beállítja a létrehozott AuthorizationRule kulcsnevét

primaryConnectionString

string

Lekéri vagy beállítja az AuthorizationRule primaryConnectionString elemét.

primaryKey

string

Lekéri vagy beállítja a létrehozott AuthorizationRule elsődleges kulcsát.

secondaryConnectionString

string

Lekéri vagy beállítja a létrehozott AuthorizationRule másodlagosConnectionString elemét

secondaryKey

string

Lekéri vagy beállítja a létrehozott AuthorizationRule másodlagos kulcsát