az cosmosdb mongodb collection
Manage Azure Cosmos DB MongoDB collections.
Commands
az cosmosdb mongodb collection create |
Create an MongoDB collection under an Azure Cosmos DB MongoDB database. |
az cosmosdb mongodb collection delete |
Delete the MongoDB collection under an Azure Cosmos DB MongoDB database. |
az cosmosdb mongodb collection exists |
Checks if an Azure Cosmos DB MongoDB collection exists. |
az cosmosdb mongodb collection list |
List the MongoDB collections under an Azure Cosmos DB MongoDB database. |
az cosmosdb mongodb collection show |
Show the details of a MongoDB collection under an Azure Cosmos DB MongoDB database. |
az cosmosdb mongodb collection throughput |
Manage throughput of MongoDB collection under an Azure Cosmos DB account. |
az cosmosdb mongodb collection throughput migrate |
Migrate the throughput of the MongoDB collection between autoscale and manually provisioned. |
az cosmosdb mongodb collection throughput show |
Get the throughput of the MongoDB collection under an Azure Cosmos DB MongoDB database. |
az cosmosdb mongodb collection throughput update |
Update the throughput of the MongoDB collection under an Azure Cosmos DB MongoDB database. |
az cosmosdb mongodb collection update |
Update an MongoDB collection under an Azure Cosmos DB MongoDB database. |
az cosmosdb mongodb collection create
Create an MongoDB collection under an Azure Cosmos DB MongoDB database.
az cosmosdb mongodb collection create --account-name
--database-name
--name
--resource-group
[--analytical-storage-ttl]
[--idx]
[--max-throughput]
[--shard]
[--subscription]
[--throughput]
Examples
Create an Azure Cosmos DB MongoDB collection.
az cosmosdb mongodb collection create -g MyResourceGroup -a MyAccount -d MyDatabase -n MyCollection --shard "ShardingKey" --idx @indexes-file.json --throughput "500"
Required Parameters
Cosmosdb account name.
Database name.
Collection name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Analytical TTL, when analytical storage is enabled.
Indexes, you can enter it as a string or as a file, e.g., --idx @indexes-file.json or --idx "[{"key": {"keys": ["_ts"]},"options": {"expireAfterSeconds": 1000}}, {"key": {"keys": ["user_id", "user_address"]}, "options": {"unique": "true"}}]".
The maximum throughput resource can scale to (RU/s). Provided when the resource is autoscale enabled. The minimum value can be 4000 (RU/s).
Sharding key path.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The throughput of MongoDB collection (RU/s). Default value is 400. Omit this parameter if the database has shared throughput unless the collection should have dedicated throughput.
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 mongodb collection delete
Delete the MongoDB collection under an Azure Cosmos DB MongoDB database.
az cosmosdb mongodb collection delete --account-name
--database-name
--name
--resource-group
[--subscription]
[--yes]
Required Parameters
Cosmosdb account name.
Database name.
Collection name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 mongodb collection exists
Checks if an Azure Cosmos DB MongoDB collection exists.
az cosmosdb mongodb collection exists --account-name
--database-name
--name
--resource-group
[--subscription]
Required Parameters
Cosmosdb account name.
Database name.
Collection name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 mongodb collection list
List the MongoDB collections under an Azure Cosmos DB MongoDB database.
az cosmosdb mongodb collection list --account-name
--database-name
--resource-group
[--query-examples]
[--subscription]
Required Parameters
Cosmosdb account name.
Database name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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 or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 mongodb collection show
Show the details of a MongoDB collection under an Azure Cosmos DB MongoDB database.
az cosmosdb mongodb collection show --account-name
--database-name
--name
--resource-group
[--query-examples]
[--subscription]
Required Parameters
Cosmosdb account name.
Database name.
Collection name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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 or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 mongodb collection update
Update an MongoDB collection under an Azure Cosmos DB MongoDB database.
az cosmosdb mongodb collection update --account-name
--database-name
--name
--resource-group
[--analytical-storage-ttl]
[--idx]
[--subscription]
Required Parameters
Cosmosdb account name.
Database name.
Collection name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Analytical TTL, when analytical storage is enabled.
Indexes, you can enter it as a string or as a file, e.g., --idx @indexes-file.json or --idx "[{"key": {"keys": ["_ts"]},"options": {"expireAfterSeconds": 1000}}, {"key": {"keys": ["user_id", "user_address"]}, "options": {"unique": "true"}}]".
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.