az cosmosdb collection
Manage Azure Cosmos DB collections.
Commands
az cosmosdb collection create |
Creates an Azure Cosmos DB collection. |
az cosmosdb collection delete |
Deletes an Azure Cosmos DB collection. |
az cosmosdb collection exists |
Returns a boolean indicating whether the collection exists. |
az cosmosdb collection list |
Lists all Azure Cosmos DB collections. |
az cosmosdb collection show |
Shows an Azure Cosmos DB collection and its offer. |
az cosmosdb collection update |
Updates an Azure Cosmos DB collection. |
az cosmosdb collection create
Creates an Azure Cosmos DB collection.
az cosmosdb collection create --collection-name
--db-name
[--default-ttl]
[--indexing-policy]
[--key]
[--name]
[--partition-key-path]
[--resource-group-name]
[--subscription]
[--throughput]
[--url-connection]
Required Parameters
Collection Name.
Database Name.
Optional Parameters
Default TTL. Provide 0 to disable.
Indexing Policy, you can enter it as a string or as a file, e.g., --indexing-policy @policy-file.json).
Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.
Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.
Partition Key Path, e.g., '/properties/name'.
Name of the resource group. Must be used in conjunction with cosmosdb account name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Offer Throughput (RU/s).
Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb collection delete
Deletes an Azure Cosmos DB collection.
az cosmosdb collection delete --collection-name
--db-name
[--key]
[--name]
[--resource-group-name]
[--subscription]
[--url-connection]
[--yes]
Required Parameters
Collection Name.
Database Name.
Optional Parameters
Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.
Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.
Name of the resource group. Must be used in conjunction with cosmosdb account name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb collection exists
Returns a boolean indicating whether the collection exists.
az cosmosdb collection exists --collection-name
--db-name
[--key]
[--name]
[--resource-group-name]
[--subscription]
[--url-connection]
Required Parameters
Collection Name.
Database Name.
Optional Parameters
Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.
Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.
Name of the resource group. Must be used in conjunction with cosmosdb account name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb collection list
Lists all Azure Cosmos DB collections.
az cosmosdb collection list --db-name
[--key]
[--name]
[--query-examples]
[--resource-group-name]
[--subscription]
[--url-connection]
Required Parameters
Database Name.
Optional Parameters
Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.
Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name of the resource group. Must be used in conjunction with cosmosdb account name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb collection show
Shows an Azure Cosmos DB collection and its offer.
az cosmosdb collection show --collection-name
--db-name
[--key]
[--name]
[--query-examples]
[--resource-group-name]
[--subscription]
[--url-connection]
Required Parameters
Collection Name.
Database Name.
Optional Parameters
Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.
Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name of the resource group. Must be used in conjunction with cosmosdb account name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb collection update
Updates an Azure Cosmos DB collection.
az cosmosdb collection update --collection-name
--db-name
[--default-ttl]
[--indexing-policy]
[--key]
[--name]
[--resource-group-name]
[--subscription]
[--throughput]
[--url-connection]
Required Parameters
Collection Name.
Database Name.
Optional Parameters
Default TTL. Provide 0 to disable.
Indexing Policy, you can enter it as a string or as a file, e.g., --indexing-policy @policy-file.json).
Cosmos DB account key. Must be used in conjunction with cosmosdb account name or url-connection.
Cosmos DB account name. Must be used in conjunction with either name of the resource group or cosmosdb account key.
Name of the resource group. Must be used in conjunction with cosmosdb account name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Offer Throughput (RU/s).
Cosmos DB account url connection. Must be used in conjunction with cosmosdb account key.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.