Dela via


Communication Services - List Keys

Listnycklar
Hämta åtkomstnycklarna för CommunicationService-resursen.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/listKeys?api-version=2023-03-31

URI-parametrar

Name I Obligatorisk Typ Description
communicationServiceName
path True

string

Namnet på CommunicationService-resursen.

Reguljärt uttrycksmönster: ^[-\w]+$

resourceGroupName
path True

string

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

subscriptionId
path True

string

uuid

ID för målprenumerationen. Värdet måste vara ett UUID.

api-version
query True

string

Den API-version som ska användas för den här åtgärden.

Svar

Name Typ Description
200 OK

CommunicationServiceKeys

Åtgärden lyckades. Svaret beskriver CommunicationService-åtkomstnycklar.

Other Status Codes

ErrorResponse

Felsvar som beskriver varför åtgärden misslyckades.

Exempel

List keys

Exempelbegäran

POST https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource/listKeys?api-version=2023-03-31

Exempelsvar

{
  "primaryKey": "<primaryKey>",
  "secondaryKey": "<secondaryKey>"
}

Definitioner

Name Description
CommunicationServiceKeys

En klass som representerar åtkomstnycklarna för en CommunicationService.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

ErrorDetail

Felinformationen.

ErrorResponse

Felsvar

CommunicationServiceKeys

En klass som representerar åtkomstnycklarna för en CommunicationService.

Name Typ Description
primaryConnectionString

string

CommunicationService anslutningssträng som skapats via primaryKey

primaryKey

string

Den primära åtkomstnyckeln.

secondaryConnectionString

string

CommunicationService anslutningssträng som skapats via secondaryKey

secondaryKey

string

Den sekundära åtkomstnyckeln.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

Name Typ Description
info

object

Ytterligare information.

type

string

Den ytterligare informationstypen.

ErrorDetail

Felinformationen.

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Ytterligare information om felet.

code

string

Felkoden.

details

ErrorDetail[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.

ErrorResponse

Felsvar

Name Typ Description
error

ErrorDetail

Felobjektet.