az cosmosdb database

Manage Azure Cosmos DB databases.

Commands

az cosmosdb database create Creates an Azure Cosmos DB database.
az cosmosdb database delete Deletes an Azure Cosmos DB database.
az cosmosdb database exists Returns a boolean indicating whether the database exists.
az cosmosdb database list Lists all Azure Cosmos DB databases.
az cosmosdb database show Shows an Azure Cosmos DB database.

az cosmosdb database create

Creates an Azure Cosmos DB database.

az cosmosdb database create --db-name
[--key]
[--name]
[--resource-group-name]
[--url-connection]

Required Parameters

--db-name -d

Database Name.

Optional Parameters

--key

Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.

--name -n

Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.

--resource-group-name -g

Name of the resource group. Must be used in conjunction with cosmosdb account name.

--url-connection

Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.

az cosmosdb database delete

Deletes an Azure Cosmos DB database.

az cosmosdb database delete --db-name
[--key]
[--name]
[--resource-group-name]
[--url-connection]

Required Parameters

--db-name -d

Database Name.

Optional Parameters

--key

Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.

--name -n

Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.

--resource-group-name -g

Name of the resource group. Must be used in conjunction with cosmosdb account name.

--url-connection

Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.

az cosmosdb database exists

Returns a boolean indicating whether the database exists.

az cosmosdb database exists --db-name
[--key]
[--name]
[--resource-group-name]
[--url-connection]

Required Parameters

--db-name -d

Database Name.

Optional Parameters

--key

Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.

--name -n

Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.

--resource-group-name -g

Name of the resource group. Must be used in conjunction with cosmosdb account name.

--url-connection

Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.

az cosmosdb database list

Lists all Azure Cosmos DB databases.

az cosmosdb database list [--key]
[--name]
[--resource-group-name]
[--url-connection]

Optional Parameters

--key

Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.

--name -n

Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.

--resource-group-name -g

Name of the resource group. Must be used in conjunction with cosmosdb account name.

--url-connection

Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.

az cosmosdb database show

Shows an Azure Cosmos DB database.

az cosmosdb database show --db-name
[--key]
[--name]
[--resource-group-name]
[--url-connection]

Required Parameters

--db-name -d

Database Name.

Optional Parameters

--key

Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.

--name -n

Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.

--resource-group-name -g

Name of the resource group. Must be used in conjunction with cosmosdb account name.

--url-connection

Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.