az cognitiveservices account keys

Manage Azure Cognitive Services accounts.

This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs.

Commands

az cognitiveservices account keys list Manage Azure Cognitive Services accounts.
az cognitiveservices account keys regenerate Manage Azure Cognitive Services accounts.

az cognitiveservices account keys list

Manage Azure Cognitive Services accounts.

az cognitiveservices account keys list --name
--resource-group
[--subscription]

Examples

Get current resource keys.

az cognitiveservices account keys list --name myresource -g cognitive-services-resource-group

Manage Azure Cognitive Services accounts. (autogenerated)

az cognitiveservices account keys list --name myresource --resource-group cognitive-services-resource-group --subscription MySubscription

Required Parameters

--name -n

Cognitive service account name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az cognitiveservices account keys regenerate

Manage Azure Cognitive Services accounts.

az cognitiveservices account keys regenerate --key-name {key1, key2}
--name
--resource-group
[--subscription]

Examples

Get new keys for resource.

az cognitiveservices account keys regenerate --name myresource -g cognitive-services-resource-group --key-name key1

Required Parameters

--key-name

Key name to generate.

accepted values: key1, key2
--name -n

Cognitive service account name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.