Share via


az cosmosdb database

This command has been deprecated and will be removed in a future release. Use 'cosmosdb sql database, cosmosdb mongodb database, cosmosdb cassandra keyspace or cosmosdb gremlin database' instead.

Manage Azure Cosmos DB databases.

Commands

Name Description Type Status
az cosmosdb database create

Creates an Azure Cosmos DB database.

Core Deprecated
az cosmosdb database delete

Deletes an Azure Cosmos DB database.

Core Deprecated
az cosmosdb database exists

Returns a boolean indicating whether the database exists.

Core Deprecated
az cosmosdb database list

Lists all Azure Cosmos DB databases.

Core Deprecated
az cosmosdb database show

Shows an Azure Cosmos DB database.

Core Deprecated

az cosmosdb database create

Deprecated

This command is implicitly deprecated because command group 'cosmosdb database' is deprecated and will be removed in a future release. Use 'cosmosdb sql database, cosmosdb mongodb database, cosmosdb cassandra keyspace or cosmosdb gremlin database' instead.

Creates an Azure Cosmos DB database.

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

Examples

Creates an Azure Cosmos DB database.

az cosmosdb database create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --db-name MyDatabase

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.

--throughput

Offer Throughput (RU/s).

--url-connection

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az cosmosdb database delete

Deprecated

This command is implicitly deprecated because command group 'cosmosdb database' is deprecated and will be removed in a future release. Use 'cosmosdb sql database, cosmosdb mongodb database, cosmosdb cassandra keyspace or cosmosdb gremlin database' instead.

Deletes an Azure Cosmos DB database.

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

Examples

Deletes an Azure Cosmos DB database (autogenerated)

az cosmosdb database delete --db-name MyDatabase --name MyCosmosDBDatabaseAccount --resource-group-name MyResourceGroup

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.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az cosmosdb database exists

Deprecated

This command is implicitly deprecated because command group 'cosmosdb database' is deprecated and will be removed in a future release. Use 'cosmosdb sql database, cosmosdb mongodb database, cosmosdb cassandra keyspace or cosmosdb gremlin database' instead.

Returns a boolean indicating whether the database exists.

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

Examples

Returns a boolean indicating whether the database exists (autogenerated)

az cosmosdb database exists --db-name MyDatabase --name MyCosmosDBDatabaseAccount --resource-group-name MyResourceGroup

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az cosmosdb database list

Deprecated

This command is implicitly deprecated because command group 'cosmosdb database' is deprecated and will be removed in a future release. Use 'cosmosdb sql database, cosmosdb mongodb database, cosmosdb cassandra keyspace or cosmosdb gremlin database' instead.

Lists all Azure Cosmos DB databases.

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

Examples

Lists all Azure Cosmos DB databases (autogenerated)

az cosmosdb database list --name MyCosmosDBDatabaseAccount --resource-group-name MyResourceGroup

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az cosmosdb database show

Deprecated

This command is implicitly deprecated because command group 'cosmosdb database' is deprecated and will be removed in a future release. Use 'cosmosdb sql database, cosmosdb mongodb database, cosmosdb cassandra keyspace or cosmosdb gremlin database' instead.

Shows an Azure Cosmos DB database.

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

Examples

Shows an Azure Cosmos DB database (autogenerated)

az cosmosdb database show --db-name MyDatabase --name MyCosmosDBDatabaseAccount --resource-group-name MyResourceGroup

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.