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 commitment-plan

Manage commitment plans for Azure Cognitive Services accounts.

az cognitiveservices account commitment-plan create

Create a commitment plan for Azure Cognitive Services account.

az cognitiveservices account commitment-plan delete

Delete a commitment plan from Azure Cognitive Services account.

az cognitiveservices account commitment-plan list

Show all commitment plans from Azure Cognitive Services account.

az cognitiveservices account commitment-plan show

Show a commitment plan from Azure Cognitive Services account.

az cognitiveservices account create

Manage Azure Cognitive Services accounts.

az cognitiveservices account delete

Manage Azure Cognitive Services accounts.

az cognitiveservices account deployment

Manage deployments for Azure Cognitive Services accounts.

az cognitiveservices account deployment create

Create a deployment for Azure Cognitive Services account.

az cognitiveservices account deployment delete

Delete a deployment from Azure Cognitive Services account.

az cognitiveservices account deployment list

Show all deployments for Azure Cognitive Services account.

az cognitiveservices account deployment show

Show a deployment for Azure Cognitive Services account.

az cognitiveservices account identity

Manage identity of Cognitive Services accounts.

az cognitiveservices account identity assign

Assign an identity of a Cognitive Services account.

az cognitiveservices account identity remove

Remove the identity from a Cognitive Services account.

az cognitiveservices account identity show

Show the identity of a Cognitive Services account.

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

List soft-deleted Azure Cognitive Services accounts.

az cognitiveservices account list-kinds

List all valid kinds for Azure Cognitive Services account.

az cognitiveservices account list-models

Manage Azure Cognitive Services accounts.

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 purge

Purge a soft-deleted Azure Cognitive Services account.

az cognitiveservices account recover

Recover a soft-deleted Azure Cognitive Services account.

az cognitiveservices account show

Manage Azure Cognitive Services accounts.

az cognitiveservices account show-deleted

Show a soft-deleted Azure Cognitive Services account.

az cognitiveservices account update

Manage Azure Cognitive Services accounts.

az cognitiveservices account create

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.

az cognitiveservices account create --kind
                                    --location
                                    --name
                                    --resource-group
                                    --sku
                                    [--api-properties]
                                    [--assign-identity]
                                    [--custom-domain]
                                    [--encryption]
                                    [--storage]
                                    [--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

Create a Text Analytics Cognitive Services account in West Europe without confirmation required and use customer owned storage.

az cognitiveservices account create -n myresource -g myResourceGroup --assign-identity --kind TextAnalytics --sku S -l WestEurope --yes
    --storage '[
    {
      "resourceId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"
    }
  ]'

Create a Text Analytics Cognitive Services account in West Europe without confirmation required and user Customer-managed encryption.

az cognitiveservices account create -n myresource -g myResourceGroup --assign-identity --kind TextAnalytics --sku S -l WestEurope --yes
    --encryption '{
      "keySource": "Microsoft.KeyVault",
      "keyVaultProperties": {
        "keyName": "KeyName",
        "keyVersion": "secretVersion",
        "keyVaultUri": "https://issue23056kv.vault.azure.net/"
      }
    }'

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.

--assign-identity

Generate and assign an Azure Active Directory Identity for this account.

default value: False
--custom-domain

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

--encryption

The encryption properties for this resource, in JSON format.

--storage

The storage accounts for this resource, in JSON array format.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--yes

Do not prompt for terms confirmation.

az cognitiveservices account delete

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.

az cognitiveservices account delete --name
                                    --resource-group

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

az cognitiveservices account list

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.

az cognitiveservices account list [--resource-group]

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

az cognitiveservices account list-deleted

List soft-deleted 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.

az cognitiveservices account list-deleted

Examples

List all the Cognitive Services accounts in a subscription.

az cognitiveservices account list-deleted

az cognitiveservices account list-kinds

List all valid kinds for Azure Cognitive Services account.

az cognitiveservices account list-kinds

az cognitiveservices account list-models

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.

az cognitiveservices account list-models --name
                                         --resource-group

Examples

List models available for a Cognitive Services account.

az cognitiveservices account list-models -n myresource -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>.

az cognitiveservices account list-skus

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.

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

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

az cognitiveservices account list-usage

List usages for Azure Cognitive Services account.

az cognitiveservices account list-usage --name
                                        --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>.

az cognitiveservices account purge

Purge a soft-deleted Azure Cognitive Services account.

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.

az cognitiveservices account purge --location
                                   --name
                                   --resource-group

Examples

Purge a soft-deleted Azure Cognitive Services account.

az cognitiveservices account purge --location eastus --resource-group cognitive-services-resource-group --name cognitive-services-account-name

Required Parameters

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

az cognitiveservices account recover

Recover a soft-deleted Azure Cognitive Services account.

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.

az cognitiveservices account recover --location
                                     --name
                                     --resource-group

Examples

Recover a soft-deleted Azure Cognitive Services account.

az cognitiveservices account recover --location eastus --resource-group cognitive-services-resource-group --name cognitive-services-account-name

Required Parameters

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

az cognitiveservices account show

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.

az cognitiveservices account show --name
                                  --resource-group

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

az cognitiveservices account show-deleted

Show a soft-deleted Azure Cognitive Services account.

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.

az cognitiveservices account show-deleted --location
                                          --name
                                          --resource-group

Examples

Show a soft-deleted Azure Cognitive Services account.

az cognitiveservices account show-deleted --location eastus --resource-group cognitive-services-resource-group --name cognitive-services-account-name

Required Parameters

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

az cognitiveservices account update

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.

az cognitiveservices account update --name
                                    --resource-group
                                    [--api-properties]
                                    [--custom-domain]
                                    [--encryption]
                                    [--sku]
                                    [--storage]
                                    [--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.

--encryption

The encryption properties for this resource, in JSON format.

--sku

Name of the Sku of cognitive services account.

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

The storage accounts for this resource, in JSON array format.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.