Microsoft.DocumentDB databaseAccounts 2015-04-01

Bicep resource definition

The databaseAccounts resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DocumentDB/databaseAccounts resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.DocumentDB/databaseAccounts@2015-04-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  kind: 'string'
  properties: {
    capabilities: [
      {
        name: 'string'
      }
    ]
    connectorOffer: 'Small'
    consistencyPolicy: {
      defaultConsistencyLevel: 'string'
      maxIntervalInSeconds: int
      maxStalenessPrefix: int
    }
    databaseAccountOfferType: 'Standard'
    enableAutomaticFailover: bool
    enableCassandraConnector: bool
    enableMultipleWriteLocations: bool
    ipRangeFilter: 'string'
    isVirtualNetworkFilterEnabled: bool
    locations: [
      {
        failoverPriority: int
        isZoneRedundant: bool
        locationName: 'string'
      }
    ]
    virtualNetworkRules: [
      {
        id: 'string'
        ignoreMissingVNetServiceEndpoint: bool
      }
    ]
  }
}

Property values

databaseAccounts

Name Description Value
name The resource name string (required)

Character limit: 3-44

Valid characters:
Lowercase letters, numbers, and hyphens.

Start with lowercase letter or number.

Resource name must be unique across Azure.
location The location of the resource group to which the resource belongs. string
tags Tags are 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. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". Dictionary of tag names and values. See Tags in templates
kind Indicates the type of database account. This can only be set at database account creation. 'GlobalDocumentDB'
'MongoDB'
'Parse'
properties Properties to create and update Azure Cosmos DB database accounts. DatabaseAccountCreateUpdatePropertiesOrDatabaseAccou... (required)

DatabaseAccountCreateUpdatePropertiesOrDatabaseAccou...

Name Description Value
capabilities List of Cosmos DB capabilities for the account Capability[]
connectorOffer The cassandra connector offer type for the Cosmos DB database C* account. 'Small'
consistencyPolicy The consistency policy for the Cosmos DB account. ConsistencyPolicy
databaseAccountOfferType The offer type for the database 'Standard' (required)
enableAutomaticFailover Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. bool
enableCassandraConnector Enables the cassandra connector on the Cosmos DB C* account bool
enableMultipleWriteLocations Enables the account to write in multiple locations bool
ipRangeFilter Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. string
isVirtualNetworkFilterEnabled Flag to indicate whether to enable/disable Virtual Network ACL rules. bool
locations An array that contains the georeplication locations enabled for the Cosmos DB account. Location[] (required)
virtualNetworkRules List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRule[]

Capability

Name Description Value
name Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin". string

ConsistencyPolicy

Name Description Value
defaultConsistencyLevel The default consistency level and configuration settings of the Cosmos DB account. 'BoundedStaleness'
'ConsistentPrefix'
'Eventual'
'Session'
'Strong' (required)
maxIntervalInSeconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. int

Constraints:
Min value = 5
Max value = 86400
maxStalenessPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. int

Constraints:
Min value = 1
Max value = 2147483647

Location

Name Description Value
failoverPriority The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. int

Constraints:
Min value = 0
isZoneRedundant Flag to indicate whether or not this region is an AvailabilityZone region bool
locationName The name of the region. string

VirtualNetworkRule

Name Description Value
id Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. string
ignoreMissingVNetServiceEndpoint Create firewall rule before the virtual network has vnet service endpoint enabled. bool

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
CI/CD using Jenkins on Azure Container Service (AKS)

Deploy to Azure
Containers make it very easy for you to continuously build and deploy your applications. By orchestrating deployment of those containers using Kubernetes in Azure Container Service, you can achieve replicable, manageable clusters of containers. By setting up a continuous build to produce your container images and orchestration, you can increase the speed and reliability of your deployment.
Web App with a SQL Database, Azure Cosmos DB, Azure Search

Deploy to Azure
This template provisions a Web App, a SQL Database, Azure Cosmos DB, Azure Search and Application Insights.
Create an Azure Cosmos DB account for Cassandra API

Deploy to Azure
This template creates an Azure Cosmos DB account for Cassandra API in two regions with a keyspace and table with dedicated throughput.
Create autoscale Azure Cosmos DB account for Cassandra API

Deploy to Azure
This template creates an Azure Cosmos DB account for Cassandra API in two regions with a keyspace and table with autoscale throughput.
Create an Azure CosmosDB Account

Deploy to Azure
This ARM template is intented to create a CosmosDB Account quickly with the minimal required values
Create an Azure Cosmos DB account in multiple regions

Deploy to Azure
This template creates an Azure Cosmos DB account for any database API type with a primary and secondary region with choice of consistency level and failover type.
Create a free-tier Azure Cosmos DB account

Deploy to Azure
This template creates a free-tier Azure Cosmos DB account for SQL API with a database with shared throughput and container.
Create an Azure Cosmos DB account for Gremlin API

Deploy to Azure
This template creates an Azure Cosmos DB account for Gremlin API in two regions with one database and one graph using dedicated throughput.
Create an Azure Cosmos DB account for Gremlin API autoscale

Deploy to Azure
This template creates an Azure Cosmos DB account for Gremlin API in two regions with one database and one graph using autoscale throughput.
Create an Azure Cosmos account for MongoDB API

Deploy to Azure
This template creates an Azure Cosmos DB account for MongoDB API 4.2 in two regions using shared and dedicated throughput with two collections.
Create an Azure Cosmos account for MongoDB API autoscale

Deploy to Azure
This template creates an Azure Cosmos DB account for MongoDB API 4.2 in two regions using both shared and dedicated autoscale throughput.
Create an Azure Cosmos DB Account with a private endpoint

Deploy to Azure
This template will create a Cosmos account, a virtual network and a private endpoint exposing the Cosmos account to the virtual network.
Create an Azure Cosmos DB account for Core (SQL) API

Deploy to Azure
This template creates an Azure Cosmos account for Core (SQL) API with a database and container with throughput with multiple other options.
Azure Cosmos DB account SQL API with analytical store

Deploy to Azure
This template creates an Azure Cosmos account for Core (SQL) API with a database and container configured with analytical store.
Create an Azure Cosmos DB account SQL API with autoscale

Deploy to Azure
This template creates an Azure Cosmos account for Core (SQL) API with a database and container with autoscale throughput with multiple other options.
Create Azure Cosmos DB Core (SQL) API stored procedures

Deploy to Azure
This template creates an Azure Cosmos DB account for Core (SQL) API and a container with a stored procedure, trigger and user defined function.
Create a minimal Azure Cosmos DB account for Core (SQL) API

Deploy to Azure
This template creates an Azure Cosmos DB account for the Core (SQL) API while only specifying the minimal required resource properties.
Create Azure Cosmos with SQL API and multiple containers

Deploy to Azure
The template creates a Cosmos container with a SQL API and allows adding mulitple containers.
Create an Azure Cosmos DB SQL Account with data plane RBAC

Deploy to Azure
This template will create a SQL Cosmos account, a natively maintained Role Definition, and a natively maintained Role Assignment for an AAD identity.
Create a Serverless Azure Cosmos DB account for SQL API

Deploy to Azure
This template creates an serverless Azure Cosmos DB account for the Core (SQL) API.
Create an Azure Cosmos account for Table API

Deploy to Azure
This template creates an Azure Cosmos DB account for Table API in two regions and a single table with provisioned throughput.
Create an Azure Cosmos account for Table API with autoscale

Deploy to Azure
This template creates an Azure Cosmos DB account for Table API in two regions and a single table with autoscale throughput.
Create a zero touch Azure Cosmos account and Azure Web App

Deploy to Azure
This template creates an Azure Cosmos account, injects the Cosmos DB endpoint and keys into Azure Web App settings, then deploys an ASP MVC web app from GitHub.
Create a Cosmos DB account with Microsoft Defender enabled

Deploy to Azure
Using this ARM template, you can deploy an Azure Cosmos DB account with Microsoft Defender for Azure Cosmos DB enabled. Microsoft Defender for Azure Cosmos DB is an Azure-native layer of security that detects attempts to exploit databases in your Azure Cosmos DB accounts. Microsoft Defender for Azure Cosmos DB detects potential SQL injections, known bad actors based on Microsoft Threat Intelligence, suspicious access patterns, and potential exploitations of your database through compromised identities or malicious insiders.
Deploy Azure Data Explorer DB with Cosmos DB connection

Deploy to Azure
Deploy Azure Data Explorer DB with Cosmos DB connection.
Azure Cosmos DB Account with Web App

Deploy to Azure
This template deploys an Azure Cosmos DB account, an App Service Plan, and creates a Web App in the App Service Plan. It also adds two Application settings to the Web App that reference the Azure Cosmos DB account endpoint. This way solutions deployed to the Web App can connect to the Azure Cosmos DB account endpoint using those settings.

ARM template resource definition

The databaseAccounts resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DocumentDB/databaseAccounts resource, add the following JSON to your template.

{
  "type": "Microsoft.DocumentDB/databaseAccounts",
  "apiVersion": "2015-04-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "kind": "string",
  "properties": {
    "capabilities": [
      {
        "name": "string"
      }
    ],
    "connectorOffer": "Small",
    "consistencyPolicy": {
      "defaultConsistencyLevel": "string",
      "maxIntervalInSeconds": "int",
      "maxStalenessPrefix": "int"
    },
    "databaseAccountOfferType": "Standard",
    "enableAutomaticFailover": "bool",
    "enableCassandraConnector": "bool",
    "enableMultipleWriteLocations": "bool",
    "ipRangeFilter": "string",
    "isVirtualNetworkFilterEnabled": "bool",
    "locations": [
      {
        "failoverPriority": "int",
        "isZoneRedundant": "bool",
        "locationName": "string"
      }
    ],
    "virtualNetworkRules": [
      {
        "id": "string",
        "ignoreMissingVNetServiceEndpoint": "bool"
      }
    ]
  }
}

Property values

databaseAccounts

Name Description Value
type The resource type 'Microsoft.DocumentDB/databaseAccounts'
apiVersion The resource api version '2015-04-01'
name The resource name string (required)

Character limit: 3-44

Valid characters:
Lowercase letters, numbers, and hyphens.

Start with lowercase letter or number.

Resource name must be unique across Azure.
location The location of the resource group to which the resource belongs. string
tags Tags are 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. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". Dictionary of tag names and values. See Tags in templates
kind Indicates the type of database account. This can only be set at database account creation. 'GlobalDocumentDB'
'MongoDB'
'Parse'
properties Properties to create and update Azure Cosmos DB database accounts. DatabaseAccountCreateUpdatePropertiesOrDatabaseAccou... (required)

DatabaseAccountCreateUpdatePropertiesOrDatabaseAccou...

Name Description Value
capabilities List of Cosmos DB capabilities for the account Capability[]
connectorOffer The cassandra connector offer type for the Cosmos DB database C* account. 'Small'
consistencyPolicy The consistency policy for the Cosmos DB account. ConsistencyPolicy
databaseAccountOfferType The offer type for the database 'Standard' (required)
enableAutomaticFailover Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. bool
enableCassandraConnector Enables the cassandra connector on the Cosmos DB C* account bool
enableMultipleWriteLocations Enables the account to write in multiple locations bool
ipRangeFilter Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. string
isVirtualNetworkFilterEnabled Flag to indicate whether to enable/disable Virtual Network ACL rules. bool
locations An array that contains the georeplication locations enabled for the Cosmos DB account. Location[] (required)
virtualNetworkRules List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRule[]

Capability

Name Description Value
name Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin". string

ConsistencyPolicy

Name Description Value
defaultConsistencyLevel The default consistency level and configuration settings of the Cosmos DB account. 'BoundedStaleness'
'ConsistentPrefix'
'Eventual'
'Session'
'Strong' (required)
maxIntervalInSeconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. int

Constraints:
Min value = 5
Max value = 86400
maxStalenessPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. int

Constraints:
Min value = 1
Max value = 2147483647

Location

Name Description Value
failoverPriority The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. int

Constraints:
Min value = 0
isZoneRedundant Flag to indicate whether or not this region is an AvailabilityZone region bool
locationName The name of the region. string

VirtualNetworkRule

Name Description Value
id Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. string
ignoreMissingVNetServiceEndpoint Create firewall rule before the virtual network has vnet service endpoint enabled. bool

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
CI/CD using Jenkins on Azure Container Service (AKS)

Deploy to Azure
Containers make it very easy for you to continuously build and deploy your applications. By orchestrating deployment of those containers using Kubernetes in Azure Container Service, you can achieve replicable, manageable clusters of containers. By setting up a continuous build to produce your container images and orchestration, you can increase the speed and reliability of your deployment.
Web App with a SQL Database, Azure Cosmos DB, Azure Search

Deploy to Azure
This template provisions a Web App, a SQL Database, Azure Cosmos DB, Azure Search and Application Insights.
Create an Azure Cosmos DB account for Cassandra API

Deploy to Azure
This template creates an Azure Cosmos DB account for Cassandra API in two regions with a keyspace and table with dedicated throughput.
Create autoscale Azure Cosmos DB account for Cassandra API

Deploy to Azure
This template creates an Azure Cosmos DB account for Cassandra API in two regions with a keyspace and table with autoscale throughput.
Create an Azure CosmosDB Account

Deploy to Azure
This ARM template is intented to create a CosmosDB Account quickly with the minimal required values
Create an Azure Cosmos DB account in multiple regions

Deploy to Azure
This template creates an Azure Cosmos DB account for any database API type with a primary and secondary region with choice of consistency level and failover type.
Create a free-tier Azure Cosmos DB account

Deploy to Azure
This template creates a free-tier Azure Cosmos DB account for SQL API with a database with shared throughput and container.
Create an Azure Cosmos DB account for Gremlin API

Deploy to Azure
This template creates an Azure Cosmos DB account for Gremlin API in two regions with one database and one graph using dedicated throughput.
Create an Azure Cosmos DB account for Gremlin API autoscale

Deploy to Azure
This template creates an Azure Cosmos DB account for Gremlin API in two regions with one database and one graph using autoscale throughput.
Create an Azure Cosmos account for MongoDB API

Deploy to Azure
This template creates an Azure Cosmos DB account for MongoDB API 4.2 in two regions using shared and dedicated throughput with two collections.
Create an Azure Cosmos account for MongoDB API autoscale

Deploy to Azure
This template creates an Azure Cosmos DB account for MongoDB API 4.2 in two regions using both shared and dedicated autoscale throughput.
Create an Azure Cosmos DB Account with a private endpoint

Deploy to Azure
This template will create a Cosmos account, a virtual network and a private endpoint exposing the Cosmos account to the virtual network.
Create an Azure Cosmos DB account for Core (SQL) API

Deploy to Azure
This template creates an Azure Cosmos account for Core (SQL) API with a database and container with throughput with multiple other options.
Azure Cosmos DB account SQL API with analytical store

Deploy to Azure
This template creates an Azure Cosmos account for Core (SQL) API with a database and container configured with analytical store.
Create an Azure Cosmos DB account SQL API with autoscale

Deploy to Azure
This template creates an Azure Cosmos account for Core (SQL) API with a database and container with autoscale throughput with multiple other options.
Create Azure Cosmos DB Core (SQL) API stored procedures

Deploy to Azure
This template creates an Azure Cosmos DB account for Core (SQL) API and a container with a stored procedure, trigger and user defined function.
Create a minimal Azure Cosmos DB account for Core (SQL) API

Deploy to Azure
This template creates an Azure Cosmos DB account for the Core (SQL) API while only specifying the minimal required resource properties.
Create Azure Cosmos with SQL API and multiple containers

Deploy to Azure
The template creates a Cosmos container with a SQL API and allows adding mulitple containers.
Create an Azure Cosmos DB SQL Account with data plane RBAC

Deploy to Azure
This template will create a SQL Cosmos account, a natively maintained Role Definition, and a natively maintained Role Assignment for an AAD identity.
Create a Serverless Azure Cosmos DB account for SQL API

Deploy to Azure
This template creates an serverless Azure Cosmos DB account for the Core (SQL) API.
Create an Azure Cosmos account for Table API

Deploy to Azure
This template creates an Azure Cosmos DB account for Table API in two regions and a single table with provisioned throughput.
Create an Azure Cosmos account for Table API with autoscale

Deploy to Azure
This template creates an Azure Cosmos DB account for Table API in two regions and a single table with autoscale throughput.
Create a zero touch Azure Cosmos account and Azure Web App

Deploy to Azure
This template creates an Azure Cosmos account, injects the Cosmos DB endpoint and keys into Azure Web App settings, then deploys an ASP MVC web app from GitHub.
Create a Cosmos DB account with Microsoft Defender enabled

Deploy to Azure
Using this ARM template, you can deploy an Azure Cosmos DB account with Microsoft Defender for Azure Cosmos DB enabled. Microsoft Defender for Azure Cosmos DB is an Azure-native layer of security that detects attempts to exploit databases in your Azure Cosmos DB accounts. Microsoft Defender for Azure Cosmos DB detects potential SQL injections, known bad actors based on Microsoft Threat Intelligence, suspicious access patterns, and potential exploitations of your database through compromised identities or malicious insiders.
Deploy Azure Data Explorer DB with Cosmos DB connection

Deploy to Azure
Deploy Azure Data Explorer DB with Cosmos DB connection.
Azure Cosmos DB Account with Web App

Deploy to Azure
This template deploys an Azure Cosmos DB account, an App Service Plan, and creates a Web App in the App Service Plan. It also adds two Application settings to the Web App that reference the Azure Cosmos DB account endpoint. This way solutions deployed to the Web App can connect to the Azure Cosmos DB account endpoint using those settings.

Terraform (AzAPI provider) resource definition

The databaseAccounts resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DocumentDB/databaseAccounts resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DocumentDB/databaseAccounts@2015-04-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      capabilities = [
        {
          name = "string"
        }
      ]
      connectorOffer = "Small"
      consistencyPolicy = {
        defaultConsistencyLevel = "string"
        maxIntervalInSeconds = int
        maxStalenessPrefix = int
      }
      databaseAccountOfferType = "Standard"
      enableAutomaticFailover = bool
      enableCassandraConnector = bool
      enableMultipleWriteLocations = bool
      ipRangeFilter = "string"
      isVirtualNetworkFilterEnabled = bool
      locations = [
        {
          failoverPriority = int
          isZoneRedundant = bool
          locationName = "string"
        }
      ]
      virtualNetworkRules = [
        {
          id = "string"
          ignoreMissingVNetServiceEndpoint = bool
        }
      ]
    }
    kind = "string"
  })
}

Property values

databaseAccounts

Name Description Value
type The resource type "Microsoft.DocumentDB/databaseAccounts@2015-04-01"
name The resource name string (required)

Character limit: 3-44

Valid characters:
Lowercase letters, numbers, and hyphens.

Start with lowercase letter or number.

Resource name must be unique across Azure.
location The location of the resource group to which the resource belongs. string
parent_id To deploy to a resource group, use the ID of that resource group. string (required)
tags Tags are 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. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". Dictionary of tag names and values.
kind Indicates the type of database account. This can only be set at database account creation. "GlobalDocumentDB"
"MongoDB"
"Parse"
properties Properties to create and update Azure Cosmos DB database accounts. DatabaseAccountCreateUpdatePropertiesOrDatabaseAccou... (required)

DatabaseAccountCreateUpdatePropertiesOrDatabaseAccou...

Name Description Value
capabilities List of Cosmos DB capabilities for the account Capability[]
connectorOffer The cassandra connector offer type for the Cosmos DB database C* account. "Small"
consistencyPolicy The consistency policy for the Cosmos DB account. ConsistencyPolicy
databaseAccountOfferType The offer type for the database "Standard" (required)
enableAutomaticFailover Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. bool
enableCassandraConnector Enables the cassandra connector on the Cosmos DB C* account bool
enableMultipleWriteLocations Enables the account to write in multiple locations bool
ipRangeFilter Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. string
isVirtualNetworkFilterEnabled Flag to indicate whether to enable/disable Virtual Network ACL rules. bool
locations An array that contains the georeplication locations enabled for the Cosmos DB account. Location[] (required)
virtualNetworkRules List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRule[]

Capability

Name Description Value
name Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin". string

ConsistencyPolicy

Name Description Value
defaultConsistencyLevel The default consistency level and configuration settings of the Cosmos DB account. "BoundedStaleness"
"ConsistentPrefix"
"Eventual"
"Session"
"Strong" (required)
maxIntervalInSeconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. int

Constraints:
Min value = 5
Max value = 86400
maxStalenessPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. int

Constraints:
Min value = 1
Max value = 2147483647

Location

Name Description Value
failoverPriority The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. int

Constraints:
Min value = 0
isZoneRedundant Flag to indicate whether or not this region is an AvailabilityZone region bool
locationName The name of the region. string

VirtualNetworkRule

Name Description Value
id Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. string
ignoreMissingVNetServiceEndpoint Create firewall rule before the virtual network has vnet service endpoint enabled. bool