CmdID / az / az cosmosdb / az cosmosdb mongodb
az cosmosdb mongodb collection
Manage Azure Cosmos DB MongoDB collections. Azure CLI reference
11 commands 8 options Its page in the Azure CLI reference
Commands
createCreate an MongoDB collection under an Azure Cosmos DB MongoDB database.deleteDelete the MongoDB collection under an Azure Cosmos DB MongoDB database.existsChecks if an Azure Cosmos DB MongoDB collection existslistList the MongoDB collections under an Azure Cosmos DB MongoDB database.mergeMerges the partitions of a mongodb collection.redistribute-partition-throughputRedistributes the partition throughput of a mongodb collection.restoreRestore a deleted mongodb collection within the same account.retrieve-partition-throughputRetrieve the partition throughput of a mongodb collection.showShow the details of a MongoDB collection under an Azure Cosmos DB MongoDB database.throughputManage throughput of MongoDB collection under an Azure Cosmos DB account.updateUpdate an MongoDB collection under an Azure Cosmos DB MongoDB database.Options
--account-name, -aCosmosdb account name.--analytical-storage-ttlAnalytical TTL, when analytical storage is enabled.--database-name, -dDatabase name.--idxIndexes, 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\"}}]"--max-throughputThe maximum throughput resource can scale to (RU/s).--name, -nCollection name--shardSharding key path.--throughputThe throughput of MongoDB collection (RU/s).