az cosmosdb collection

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

Manage Azure Cosmos DB collections.

Commands

Name Description Type Status
az cosmosdb collection create

Creates an Azure Cosmos DB collection.

Core Deprecated
az cosmosdb collection delete

Deletes an Azure Cosmos DB collection.

Core Deprecated
az cosmosdb collection exists

Returns a boolean indicating whether the collection exists.

Core Deprecated
az cosmosdb collection list

Lists all Azure Cosmos DB collections.

Core Deprecated
az cosmosdb collection show

Shows an Azure Cosmos DB collection and its offer.

Core Deprecated
az cosmosdb collection update

Updates an Azure Cosmos DB collection.

Core Deprecated

az cosmosdb collection create

Deprecated

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

Creates an Azure Cosmos DB collection.

az cosmosdb collection create --collection-name
                              --db-name
                              [--cep]
                              [--default-ttl]
                              [--indexing-policy]
                              [--key]
                              [--name]
                              [--partition-key-path]
                              [--resource-group-name]
                              [--throughput]
                              [--url-connection]

Required Parameters

--collection-name -c

Collection Name.

--db-name -d

Database Name.

Optional Parameters

--cep

Client Encryption Policy, you can enter it as a string or as a file, e.g., --cep @policy-file.json or --cep "{"includedPaths": [{"path": "/path1","clientEncryptionKeyId": "key1","encryptionAlgorithm": "AEAD_AES_256_CBC_HMAC_SHA256","encryptionType": "Deterministic"}],"policyFormatVersion": 2}".

--default-ttl

Default TTL. Provide 0 to disable.

--indexing-policy

Indexing Policy, you can enter it as a string or as a file, e.g., --indexing-policy @policy-file.json).

Default value: { "indexingMode": "consistent", "automatic": true, "includedPaths": [ { "path": "/*" } ], "excludedPaths": [ { "path": "/\"_etag\"/?" } ] }
--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.

--partition-key-path

Partition Key Path, e.g., '/properties/name'.

--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 collection delete

Deprecated

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

Deletes an Azure Cosmos DB collection.

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

Required Parameters

--collection-name -c

Collection Name.

--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 collection exists

Deprecated

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

Returns a boolean indicating whether the collection exists.

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

Required Parameters

--collection-name -c

Collection Name.

--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 collection list

Deprecated

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

Lists all Azure Cosmos DB collections.

az cosmosdb collection list --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.

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 collection show

Deprecated

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

Shows an Azure Cosmos DB collection and its offer.

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

Required Parameters

--collection-name -c

Collection Name.

--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 collection update

Deprecated

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

Updates an Azure Cosmos DB collection.

az cosmosdb collection update --collection-name
                              --db-name
                              [--default-ttl]
                              [--indexing-policy]
                              [--key]
                              [--name]
                              [--resource-group-name]
                              [--throughput]
                              [--url-connection]

Required Parameters

--collection-name -c

Collection Name.

--db-name -d

Database Name.

Optional Parameters

--default-ttl

Default TTL. Provide 0 to disable.

--indexing-policy

Indexing Policy, you can enter it as a string or as a file, e.g., --indexing-policy @policy-file.json).

--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.