Microsoft.DocumentDB databaseAccounts/sqlDatabases 2020-09-01

Template format

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

{
  "name": "string",
  "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
  "apiVersion": "2020-09-01",
  "location": "string",
  "tags": {},
  "properties": {
    "resource": {
      "id": "string"
    },
    "options": {
      "throughput": "integer",
      "autoscaleSettings": {
        "maxThroughput": "integer"
      }
    }
  },
  "resources": []
}

Property values

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

Microsoft.DocumentDB/databaseAccounts/sqlDatabases object

Note

In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name string Yes Cosmos DB database name.
type enum Yes For JSON -sqlDatabases
-or-
Microsoft.DocumentDB/databaseAccounts/sqlDatabases

See Set name and type for child resources.
apiVersion enum Yes For JSON - 2020-09-01
location string No The location of the resource group to which the resource belongs.
tags object No
properties object Yes Properties to create and update Azure Cosmos DB SQL database. - SqlDatabaseCreateUpdateProperties object
resources array No containers

SqlDatabaseCreateUpdateProperties object

Name Type Required Value
resource object Yes The standard JSON format of a SQL database - SqlDatabaseResource object
options object No A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. - CreateUpdateOptions object

SqlDatabaseResource object

Name Type Required Value
id string Yes Name of the Cosmos DB SQL database

CreateUpdateOptions object

Name Type Required Value
throughput integer No Request Units per second. For example, "throughput": 10000.
autoscaleSettings object No Specifies the Autoscale settings. - AutoscaleSettings object

AutoscaleSettings object

Name Type Required Value
maxThroughput integer No Represents maximum throughput, the resource can scale up to.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
bicep-with-prereqs test deployment

Deploy to Azure
bicep-with-prereqs test deployment
Create a free-tier Azure Cosmos DB account

Deploy to Azure
This template creates a free-tier Azure Cosmos account for Core (SQL) API with a database with shared throughput of 400 RU/s.
Create an Azure Cosmos 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 Core (SQL) API stored procedures

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