Accounts - List Keys

Lijsten de accountsleutels voor het opgegeven Cognitive Services-account.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys?api-version=2023-05-01

URI-parameters

Name In Vereist Type Description
accountName
path True

string

De naam van het Cognitive Services-account.

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

resourceGroupName
path True

string

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

subscriptionId
path True

string

De id van het doelabonnement.

api-version
query True

string

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

Antwoorden

Name Type Description
200 OK

ApiKeys

Retourneert met een antwoordtekst die de abonnementssleutels voor de resource bevat: sleutel1 De eerste API-sleutel voor verificatie wanneer de client het API-eindpunt aanroept.

key2 De tweede API-sleutel voor verificatie wanneer de client het API-eindpunt aanroept.

Other Status Codes

ErrorResponse

Foutreactie waarin wordt beschreven waarom de bewerking is mislukt

Voorbeelden

List Keys

Sample Request

POST https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/myAccount/listKeys?api-version=2023-05-01

Sample Response

{
  "key1": "KEY1",
  "key2": "KEY2"
}

Definities

Name Description
ApiKeys

De toegangssleutels voor het Cognitive Services-account.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Foutreactie

ApiKeys

De toegangssleutels voor het Cognitive Services-account.

Name Type Description
key1

string

Hiermee wordt de waarde van sleutel 1 opgehaald.

key2

string

Hiermee wordt de waarde van sleutel 2 opgehaald.

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[]

De fout 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.