Microsoft.CognitiveServices accounts template reference

Template format

To create a Microsoft.CognitiveServices/accounts resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.CognitiveServices/accounts",
  "apiVersion": "2017-04-18",
  "kind": "string",
  "location": "string",
  "properties": {
    "customSubDomainName": "string",
    "networkAcls": {
      "defaultAction": "string",
      "ipRules": [
        {
          "value": "string"
        }
      ],
      "virtualNetworkRules": [
        {
          "id": "string",
          "state": "string",
          "ignoreMissingVnetServiceEndpoint": "boolean"
        }
      ]
    },
    "encryption": {
      "keyVaultProperties": {
        "keyName": "string",
        "keyVersion": "string",
        "keyVaultUri": "string"
      },
      "keySource": "string"
    },
    "userOwnedStorage": [
      {
        "resourceId": "string"
      }
    ],
    "privateEndpointConnections": [
      {
        "properties": {
          "privateEndpoint": {},
          "privateLinkServiceConnectionState": {
            "status": "string",
            "description": "string",
            "actionRequired": "string"
          },
          "groupIds": [
            "string"
          ]
        }
      }
    ],
    "publicNetworkAccess": "string",
    "apiProperties": {
      "qnaRuntimeEndpoint": "string",
      "statisticsEnabled": "boolean",
      "eventHubConnectionString": "string",
      "storageAccountConnectionString": "string"
    }
  },
  "sku": {
    "name": "string"
  },
  "tags": {},
  "identity": {
    "type": "string",
    "userAssignedIdentities": {}
  },
  "resources": []
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.CognitiveServices/accounts object

Name Type Required Value
name string Yes The name of Cognitive Services account.
type enum Yes Microsoft.CognitiveServices/accounts
apiVersion enum Yes 2017-04-18
kind string No The Kind of the resource.
location string No The location of the resource
properties object Yes Properties of Cognitive Services account. - CognitiveServicesAccountProperties object
sku object No The SKU of Cognitive Services account. - Sku object
tags object No Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
identity object No The identity of Cognitive Services account. - Identity object
resources array No privateEndpointConnections

CognitiveServicesAccountProperties object

Name Type Required Value
customSubDomainName string No Optional subdomain name used for token-based authentication.
networkAcls object No A collection of rules governing the accessibility from specific network locations. - NetworkRuleSet object
encryption object No The encryption properties for this resource. - Encryption object
userOwnedStorage array No The storage accounts for this resource. - UserOwnedStorage object
privateEndpointConnections array No The private endpoint connection associated with the Cognitive Services account. - PrivateEndpointConnection object
publicNetworkAccess enum No Whether or not public endpoint access is allowed for this account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - Enabled or Disabled
apiProperties object No The api properties for special APIs. - CognitiveServicesAccountApiProperties object

Sku object

Name Type Required Value
name string Yes Gets or sets the sku name. Required for account creation, optional for update.

Identity object

Name Type Required Value
type enum No Type of managed service identity. - None, SystemAssigned, UserAssigned
userAssignedIdentities object No The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}

NetworkRuleSet object

Name Type Required Value
defaultAction enum No The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. - Allow or Deny
ipRules array No The list of IP address rules. - IpRule object
virtualNetworkRules array No The list of virtual network rules. - VirtualNetworkRule object

Encryption object

Name Type Required Value
keyVaultProperties object No Properties of KeyVault - KeyVaultProperties object
keySource enum No Enumerates the possible value of keySource for Encryption. - Microsoft.CognitiveServices or Microsoft.KeyVault

UserOwnedStorage object

Name Type Required Value
resourceId string No Full resource id of a Microsoft.Storage resource.

PrivateEndpointConnection object

Name Type Required Value
properties object No Resource properties. - PrivateEndpointConnectionProperties object

CognitiveServicesAccountApiProperties object

Name Type Required Value
qnaRuntimeEndpoint string No (QnAMaker Only) The runtime endpoint of QnAMaker.
statisticsEnabled boolean No (Bing Search Only) The flag to enable statistics of Bing Search.
eventHubConnectionString string No (Personalization Only) The flag to enable statistics of Bing Search.
storageAccountConnectionString string No (Personalization Only) The storage account connection string.

IpRule object

Name Type Required Value
value string Yes An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).

VirtualNetworkRule object

Name Type Required Value
id string Yes Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
state string No Gets the state of virtual network rule.
ignoreMissingVnetServiceEndpoint boolean No Ignore missing vnet service endpoint or not.

KeyVaultProperties object

Name Type Required Value
keyName string No Name of the Key from KeyVault
keyVersion string No Version of the Key from KeyVault
keyVaultUri string No Uri of KeyVault

PrivateEndpointConnectionProperties object

Name Type Required Value
privateEndpoint object No The resource of private end point. - PrivateEndpoint object
privateLinkServiceConnectionState object Yes A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState object
groupIds array No The private link resource group ids. - string

PrivateLinkServiceConnectionState object

Name Type Required Value
status enum No Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - Pending, Approved, Rejected, Disconnected
description string No The reason for approval/rejection of the connection.
actionRequired string No A message indicating if changes on the service provider require any updates on the consumer.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Cognitive Services Computer Vision API

Deploy to Azure
A template for creating a new Cognitive Services Computer Vision API
Cognitive Services Translation API

Deploy to Azure
A template for creating a new Cognitive Services Translation API
Cognitive Service Universal Key

Deploy to Azure
This template allows you to create an Cognitive Service Universal.