az cognitiveservices account

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 create Manage Azure Cognitive Services accounts.
az cognitiveservices account delete Manage Azure Cognitive Services accounts.
az cognitiveservices account keys Manage Azure Cognitive Services accounts.
az cognitiveservices account keys list Manage Azure Cognitive Services accounts.
az cognitiveservices account keys regenerate Manage Azure Cognitive Services accounts.
az cognitiveservices account list Manage Azure Cognitive Services accounts.
az cognitiveservices account list-kinds List all valid kinds for Azure Cognitive Services account.
az cognitiveservices account list-skus Manage Azure Cognitive Services accounts.
az cognitiveservices account list-usage List usages for Azure Cognitive Services account.
az cognitiveservices account network-rule Manage network rules.
az cognitiveservices account network-rule add Add a network rule.
az cognitiveservices account network-rule list List network rules.
az cognitiveservices account network-rule remove Remove a network rule.
az cognitiveservices account show Manage Azure Cognitive Services accounts.
az cognitiveservices account update Manage Azure Cognitive Services accounts.

az cognitiveservices account create

Manage Azure Cognitive Services accounts.

az cognitiveservices account create --kind
--location
--name
--resource-group
--sku
[--api-properties]
[--custom-domain]
[--subscription]
[--tags]
[--yes]

Examples

Create an S0 face API Cognitive Services account in West Europe without confirmation required.

az cognitiveservices account create -n myresource -g myResourceGroup --kind Face --sku S0 -l WestEurope --yes

Manage Azure Cognitive Services accounts. (autogenerated)

az cognitiveservices account create --kind Face --location WestEurope --name myresource --resource-group myResourceGroup --sku S0 --subscription MySubscription --yes

Required Parameters

--kind

The API name of cognitive services account.

value from: az cognitiveservices account list-kinds
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

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

--sku

Name of the Sku of cognitive services account.

value from: az cognitiveservices account list-skus

Optional Parameters

--api-properties

Api properties in JSON format or a=b c=d format. Some cognitive services (i.e. QnA Maker) require extra api properties to create the account.

--custom-domain

User domain assigned to the account. Name is the CNAME source.

--subscription

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

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

--yes

Do not prompt for terms confirmation.

az cognitiveservices account delete

Manage Azure Cognitive Services accounts.

az cognitiveservices account delete --name
--resource-group
[--subscription]

Examples

Delete account.

az cognitiveservices account delete --name myresource-luis -g cognitive-services-resource-group

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 list

Manage Azure Cognitive Services accounts.

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

Examples

List all the Cognitive Services accounts in a resource group.

az cognitiveservices account list -g MyResourceGroup

Optional Parameters

--resource-group -g

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

--subscription

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

az cognitiveservices account list-kinds

List all valid kinds for Azure Cognitive Services account.

az cognitiveservices account list-kinds [--subscription]

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 list-skus

Manage Azure Cognitive Services accounts.

az cognitiveservices account list-skus [--kind]
[--location]
[--name]
[--resource-group]
[--subscription]

Examples

Show SKUs.

az cognitiveservices account list-skus --kind Face --location westus

Optional Parameters

--kind

The API name of cognitive services account.

value from: az cognitiveservices account list-kinds
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

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

--subscription

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

az cognitiveservices account list-usage

List usages for Azure Cognitive Services account.

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

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 show

Manage Azure Cognitive Services accounts.

az cognitiveservices account show --name
--resource-group
[--subscription]

Examples

Show account information.

az cognitiveservices account show --name myresource --resource-group cognitive-services-resource-group

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 update

Manage Azure Cognitive Services accounts.

az cognitiveservices account update --name
--resource-group
[--api-properties]
[--custom-domain]
[--sku]
[--subscription]
[--tags]

Examples

Update sku and tags.

az cognitiveservices account update --name myresource -g cognitive-services-resource-group --sku S0 --tags external-app=chatbot-HR azure-web-app-bot=HR-external azure-app-service=HR-external-app-service

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

--api-properties

Api properties in JSON format or a=b c=d format. Some cognitive services (i.e. QnA Maker) require extra api properties to create the account.

--custom-domain

User domain assigned to the account. Name is the CNAME source.

--sku

Name of the Sku of cognitive services account.

value from: az cognitiveservices account list-skus
--subscription

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

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.