az cosmosdb
Note
This reference is part of the cosmosdb-preview extension for the Azure CLI (version 2.17.1 or higher). The extension will automatically install the first time you run an az cosmosdb command. Learn more about extensions.
Manage Azure Cosmos DB database accounts.
Commands
Name | Description | Type | Status |
---|---|---|---|
az cosmosdb copy |
Manage container copy job. |
Extension | Preview |
az cosmosdb copy cancel |
Cancel a container copy job. |
Extension | Preview |
az cosmosdb copy complete |
Completes an online container copy job. |
Extension | Preview |
az cosmosdb copy create |
Creates a container copy job. |
Extension | Preview |
az cosmosdb copy list |
Get a container copy job. |
Extension | Preview |
az cosmosdb copy pause |
Pause a container copy job. |
Extension | Preview |
az cosmosdb copy resume |
Resume a container copy job. |
Extension | Preview |
az cosmosdb copy show |
Get a container copy job. |
Extension | Preview |
az cosmosdb create |
Creates a new Azure Cosmos DB database account. |
Extension | Preview |
az cosmosdb dts |
Manage data transfer job with cosmosdb. |
Extension | Preview and Deprecated |
az cosmosdb dts cancel |
Cancels a Data Transfer Job. |
Extension | Preview and Deprecated |
az cosmosdb dts copy |
Creates a Data Transfer Copy Job. |
Extension | Preview and Deprecated |
az cosmosdb dts list |
Get a list of Data Transfer Jobs. |
Extension | Preview and Deprecated |
az cosmosdb dts pause |
Pause a Data Transfer Job. |
Extension | Preview and Deprecated |
az cosmosdb dts resume |
Resumes a Data Transfer Job. |
Extension | Preview and Deprecated |
az cosmosdb dts show |
Get a Data Transfer Job. |
Extension | Preview and Deprecated |
az cosmosdb gremlin |
Manage Gremlin resources of Azure Cosmos DB account. |
Extension | GA |
az cosmosdb gremlin database |
Manage Azure Cosmos DB Gremlin databases. |
Extension | GA |
az cosmosdb gremlin database restore |
Restore a deleted gremlin database within the same account. |
Extension | Preview |
az cosmosdb gremlin graph |
Manage Azure Cosmos DB Gremlin graphs. |
Extension | GA |
az cosmosdb gremlin graph restore |
Restore a deleted gremlin graph within the same account. |
Extension | Preview |
az cosmosdb gremlin restorable-database |
Manage different versions of gremlin databases that are restorable in a Azure Cosmos DB account. |
Extension | Preview |
az cosmosdb gremlin restorable-database list |
List all the versions of all the gremlin databases that were created / modified / deleted in the given restorable account. |
Extension | Preview |
az cosmosdb gremlin restorable-graph |
Manage different versions of gremlin graphs that are restorable in a database of a Azure Cosmos DB account. |
Extension | Preview |
az cosmosdb gremlin restorable-graph list |
List all the versions of all the gremlin graphs that were created / modified / deleted in the given database and restorable account. |
Extension | Preview |
az cosmosdb gremlin restorable-resource |
Manage the databases and its graphs that can be restored in the given account at the given timestamp and region. |
Extension | Preview |
az cosmosdb gremlin restorable-resource list |
List all the databases and its graphs that can be restored in the given account at the given timestamp and region. |
Extension | Preview |
az cosmosdb gremlin retrieve-latest-backup-time |
Retrieves latest restorable timestamp for the given gremlin graph in given region. |
Extension | Preview |
az cosmosdb list |
List Azure Cosmos DB database accounts. |
Extension | GA |
az cosmosdb mongocluster |
Mongo cluster. |
Extension | Preview |
az cosmosdb mongocluster create |
Create a Mongo cluster. |
Extension | Preview |
az cosmosdb mongocluster delete |
Delete a Mongo Cluster Resource. |
Extension | Preview |
az cosmosdb mongocluster firewall |
Mongo cluster firewall. |
Extension | Preview |
az cosmosdb mongocluster firewall rule |
Mongo cluster firewall rule. |
Extension | Preview |
az cosmosdb mongocluster firewall rule create |
Create a Mongo cluster firewall rule. |
Extension | Preview |
az cosmosdb mongocluster firewall rule delete |
Delete a Mongo cluster firewall rule. |
Extension | Preview |
az cosmosdb mongocluster firewall rule list |
Lists firewall rule on a Mongo cluster. |
Extension | Preview |
az cosmosdb mongocluster firewall rule show |
Get a Mongo cluster firewall rule. |
Extension | Preview |
az cosmosdb mongocluster firewall rule update |
Create a Mongo cluster firewall rule. |
Extension | Preview |
az cosmosdb mongocluster list |
List a Mongo Cluster Resource. |
Extension | Preview |
az cosmosdb mongocluster show |
Get a Mongo Cluster Resource. |
Extension | Preview |
az cosmosdb mongocluster update |
Update a Mongo cluster. |
Extension | Preview |
az cosmosdb mongodb |
Manage MongoDB resources of Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb collection |
Manage Azure Cosmos DB MongoDB collections. |
Extension | GA |
az cosmosdb mongodb collection merge |
Merges the partitions of a mongodb collection. |
Extension | Preview |
az cosmosdb mongodb collection redistribute-partition-throughput |
Redistributes the partition throughput of a mongodb collection. |
Extension | Preview |
az cosmosdb mongodb collection restore |
Restore a deleted mongodb collection within the same account. |
Extension | Preview |
az cosmosdb mongodb collection retrieve-partition-throughput |
Retrieve the partition throughput of a mongodb collection. |
Extension | Preview |
az cosmosdb mongodb database |
Manage Azure Cosmos DB MongoDB databases. |
Extension | GA |
az cosmosdb mongodb database merge |
Merges the partitions of a mongodb database. |
Extension | Preview |
az cosmosdb mongodb database restore |
Restore a deleted mongodb database within the same account. |
Extension | Preview |
az cosmosdb mongodb restorable-collection |
Manage different versions of mongodb collections that are restorable in a database of a Azure Cosmos DB account. |
Extension | Preview |
az cosmosdb mongodb restorable-collection list |
List all the versions of all the mongodb collections that were created / modified / deleted in the given database and restorable account. |
Extension | Preview |
az cosmosdb mongodb role |
Manage Azure Cosmos DB Mongo role resources. |
Extension | GA |
az cosmosdb mongodb role definition |
Manage Azure Cosmos DB Mongo role definitions. |
Extension | GA |
az cosmosdb mongodb role definition create |
Create a Mongo DB role definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb role definition delete |
Delete a CosmosDb MongoDb role definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb role definition exists |
Check if an Azure Cosmos DB MongoDb role definition exists. |
Extension | GA |
az cosmosdb mongodb role definition list |
List all MongoDb role definitions under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb role definition show |
Show the properties of a MongoDb role definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb role definition update |
Update a MongoDb role definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user |
Manage Azure Cosmos DB Mongo user resources. |
Extension | GA |
az cosmosdb mongodb user definition |
Manage Azure Cosmos DB Mongo user definitions. |
Extension | GA |
az cosmosdb mongodb user definition create |
Create a Mongo DB user definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user definition delete |
Delete a CosmosDb MongoDb user definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user definition exists |
Check if an Azure Cosmos DB MongoDb user definition exists. |
Extension | GA |
az cosmosdb mongodb user definition list |
List all MongoDb user definitions under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user definition show |
Show the properties of a MongoDb user definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user definition update |
Update a MongoDb user definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb restorable-database-account |
Manage restorable Azure Cosmos DB accounts. |
Extension | GA |
az cosmosdb restorable-database-account list |
List all the database accounts that can be restored. |
Extension | GA |
az cosmosdb restorable-database-account show |
Show the details of a database account that can be restored. |
Extension | GA |
az cosmosdb restore |
Create a new Azure Cosmos DB database account by restoring from an existing database account. |
Extension | Preview |
az cosmosdb service |
Commands to perform operations on Service. |
Extension | Preview |
az cosmosdb service create |
Create a cosmosdb service resource. |
Extension | Preview |
az cosmosdb service delete |
Delete the given cosmosdb service resource. |
Extension | Preview |
az cosmosdb service list |
List all cosmosdb service resource under an account. |
Extension | Preview |
az cosmosdb service show |
Get cosmosdb service resource under an account. |
Extension | Preview |
az cosmosdb service update |
Update a cosmosdb service resource. |
Extension | Preview |
az cosmosdb show |
Get the details of an Azure Cosmos DB database account. |
Extension | GA |
az cosmosdb sql |
Manage SQL resources of Azure Cosmos DB account. |
Extension | GA |
az cosmosdb sql container |
Manage Azure Cosmos DB SQL containers. |
Extension | GA |
az cosmosdb sql container create |
Create an SQL container under an Azure Cosmos DB SQL database. |
Extension | GA |
az cosmosdb sql container merge |
Merges the partitions of a sql container. |
Extension | Preview |
az cosmosdb sql container redistribute-partition-throughput |
Redistributes the partition throughput of a sql container. |
Extension | Preview |
az cosmosdb sql container restore |
Restore a deleted sql container within the same account. |
Extension | Preview |
az cosmosdb sql container retrieve-partition-throughput |
Retrieve the partition throughput of a sql container. |
Extension | Preview |
az cosmosdb sql container update |
Update an SQL container under an Azure Cosmos DB SQL database. |
Extension | GA |
az cosmosdb sql database |
Manage Azure Cosmos DB SQL databases. |
Extension | GA |
az cosmosdb sql database merge |
Merge the partitions of a sql database. |
Extension | Preview |
az cosmosdb sql database restore |
Restore a deleted sql database within the same account. |
Extension | Preview |
az cosmosdb sql restorable-container |
Manage different versions of sql containers that are restorable in a database of a Azure Cosmos DB account. |
Extension | Preview |
az cosmosdb sql restorable-container list |
List all the versions of all the sql containers that were created / modified / deleted in the given database and restorable account. |
Extension | Preview |
az cosmosdb table |
Manage Table resources of Azure Cosmos DB account. |
Extension | GA |
az cosmosdb table restorable-resource |
Manage the tables that can be restored in the given account at the given timestamp and region. |
Extension | Preview |
az cosmosdb table restorable-resource list |
List all the tables that can be restored in the given account at the given timestamp and region. |
Extension | Preview |
az cosmosdb table restorable-table |
Manage different versions of tables that are restorable in Azure Cosmos DB account. |
Extension | Preview |
az cosmosdb table restorable-table list |
List all the versions of all the tables that were created / modified / deleted in the given restorable account. |
Extension | Preview |
az cosmosdb table restore |
Restore a deleted table within the same account. |
Extension | Preview |
az cosmosdb table retrieve-latest-backup-time |
Retrieves latest restorable timestamp for the given table in given region. |
Extension | Preview |
az cosmosdb update |
Update an Azure Cosmos DB database account. |
Extension | GA |
az cosmosdb create
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Creates a new Azure Cosmos DB database account.
az cosmosdb create --name
--resource-group
[--analytical-storage-schema-type {FullFidelity, WellDefined}]
[--assign-identity]
[--backup-interval]
[--backup-policy-type {Continuous, Periodic}]
[--backup-redundancy {Geo, Local, Zone}]
[--backup-retention]
[--capabilities]
[--continuous-tier {Continuous30Days, Continuous7Days}]
[--databases-to-restore]
[--default-consistency-level {BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong}]
[--default-identity]
[--default-priority-level {High, Low}]
[--disable-key-based-metadata-write-access {false, true}]
[--enable-analytical-storage {false, true}]
[--enable-automatic-failover {false, true}]
[--enable-burst-capacity {false, true}]
[--enable-free-tier {false, true}]
[--enable-materialized-views {false, true}]
[--enable-multiple-write-locations {false, true}]
[--enable-partition-merge {false, true}]
[--enable-pbe {false, true}]
[--enable-prpp-autoscale {false, true}]
[--enable-virtual-network {false, true}]
[--gremlin-databases-to-restore]
[--ip-range-filter]
[--is-restore-request {false, true}]
[--key-uri]
[--kind {GlobalDocumentDB, MongoDB, Parse}]
[--locations]
[--max-interval]
[--max-staleness-prefix]
[--network-acl-bypass {AzureServices, None}]
[--network-acl-bypass-resource-ids]
[--public-network-access {DISABLED, ENABLED, SECUREDBYPERIMETER}]
[--restore-source]
[--restore-timestamp]
[--server-version {3.2, 3.6, 4.0, 4.2}]
[--tables-to-restore]
[--tags]
[--virtual-network-rules]
Examples
DB database account. (autogenerated)
az cosmosdb create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --subscription MySubscription
Creates a new Azure Cosmos DB database account with two regions. UK South is zone redundant.
az cosmosdb create -n myaccount -g mygroup --locations regionName=eastus failoverPriority=0 isZoneRedundant=False --locations regionName=uksouth failoverPriority=1 isZoneRedundant=True --enable-multiple-write-locations --network-acl-bypass AzureServices --network-acl-bypass-resource-ids /subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName
Create a new Azure Cosmos DB database account by restoring from an existing account in the given location
az cosmosdb create -n restoredaccount -g mygroup --is-restore-request true --restore-source /subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d056a4f8-044a-436f-80c8-cd3edbc94c68 --restore-timestamp 2020-07-13T16:03:41+0000 --locations regionName=westus failoverPriority=0 isZoneRedundant=False
Creates a new Azure Cosmos DB database account with materialized views and cassandra capability enabled.
az cosmosdb create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --enable-materialized-views true --capabilities EnableCassandra CassandraEnableMaterializedViews
Required Parameters
Name of the Cosmos DB database account.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Schema type for analytical storage.
Assign system or user assigned identities separated by spaces. Use '[system]' to refer system assigned identity.
The frequency(in minutes) with which backups are taken (only for accounts with periodic mode backups).
The type of backup policy of the account to create.
The redundancy type of the backup Storage account.
The time(in hours) for which each backup is retained (only for accounts with periodic mode backups).
Set custom capabilities on the Cosmos DB database account.
The tier of Continuous backup.
Add a database and its collection names to restore.
Usage: --databases-to-restore name=DatabaseName collections=collection1 [collection2 ...].
Default consistency level of the Cosmos DB database account.
The primary identity to access key vault in CMK related features. e.g. 'FirstPartyIdentity', 'SystemAssignedIdentity' and more.
Default Priority Level of Request if not specified.
Disable write operations on metadata resources (databases, containers, throughput) via account keys.
Flag to enable log storage on the account.
Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
Flag to enable burst capacity on the account.
If enabled the account is free-tier.
Flag to enable MaterializedViews on the account.
Enable Multiple Write Locations.
Flag to enable partition merge on the account.
Flag to enable priority based execution on the account.
Enable or disable PerRegionPerPartitionAutoscale.
Enables virtual network on the Cosmos DB database account.
Add a gremlin database and its graph names to restore.
Usage: --gremlin-databases-to-restore name=DatabaseName graphs=graph1 [graph2 ...].
Firewall support. Specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma-separated and must not contain any spaces.
Restore from an existing/deleted account.
The URI of the key vault.
The type of Cosmos DB database account to create.
Add a location to the Cosmos DB database account.
Usage: --locations KEY=VALUE [KEY=VALUE ...]
Required Keys: regionName, failoverPriority
Optional Key: isZoneRedundant
Default: single region account in the location of the specified resource group.
Failover priority values are 0 for write regions and greater than 0 for read regions. A failover priority value must be unique and less than the total number of regions.
Multiple locations can be specified by using more than one --locations
argument.
When used with Bounded Staleness consistency, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 1 - 100.
When used with Bounded Staleness consistency, this value represents the number of stale requests tolerated. Accepted range for this value is 1 - 2,147,483,647.
Flag to enable or disable Network Acl Bypass.
List of Resource Ids to allow Network Acl Bypass.
Sets public network access in server to either Enabled, Disabled, or SecuredByPerimeter.
The restorable-database-account Id of the source account from which the account has to be restored. Required if --is-restore-request is set to true.
The timestamp to which the account has to be restored to. Required if --is-restore-request is set to true.
Valid only for MongoDB accounts.
Add table names to restore.
Usage: --tables-to-restore tables=table1 [table2 ...].
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
ACL's for virtual network.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb list
List Azure Cosmos DB database accounts.
az cosmosdb list [--resource-group]
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb restore
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a new Azure Cosmos DB database account by restoring from an existing database account.
az cosmosdb restore --account-name
--location
--resource-group
--restore-timestamp
--target-database-account-name
[--assign-identity]
[--databases-to-restore]
[--default-identity]
[--disable-ttl {false, true}]
[--gremlin-databases-to-restore]
[--public-network-access {DISABLED, ENABLED}]
[--source-backup-location]
[--tables-to-restore]
Examples
Create a new Azure Cosmos DB database account by restoring from an existing database account.
az cosmosdb restore --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 -g MyResourceGroup --location westus
Create a new Azure Cosmos DB Sql or MongoDB database account by restoring only the selected databases and collections from an existing database account.
az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --databases-to-restore name=MyDB1 collections=collection1 collection2 --databases-to-restore name=MyDB2 collections=collection3 collection4
Create a new Azure Cosmos DB Gremlin database account by restoring only the selected databases or graphs from an existing database account.
az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --gremlin-databases-to-restore name=graphdb1 graphs=graph1 graph2
Create a new Azure Cosmos DB Table database account by restoring only the selected tables from an existing database account.
az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --tables-to-restore table1,table2
Required Parameters
Name of the source Cosmos DB database account for the restore.
This is the write region of the restored account. This is also the location of the source account where its backups are located if source_backup_location is not provided.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The timestamp to which the account has to be restored to.
Name of the new target Cosmos DB database account after the restore.
Optional Parameters
Assign system or user assigned identities separated by spaces. Use '[system]' to refer system assigned identity.
Add a database and its collection names to restore.
Usage: --databases-to-restore name=DatabaseName collections=collection1 [collection2 ...]
Multiple databases can be specified by using more than one --databases-to-restore
argument.
The primary identity to access key vault in CMK related features. e.g. 'FirstPartyIdentity', 'SystemAssignedIdentity' and more.
Enable or disable restoring with ttl disabled.
Add a gremlin database and its graph names to restore.
Usage: --gremlin-databases-to-restore name=DatabaseName graphs=graph1 [graph2 ...].
Sets public network access in server to either Enabled or Disabled.
This is the location of the source account where backups are located. Provide this value if the source and target are in different locations.
Add table names to restore.
Usage: --tables-to-restore table1 [table2 ...].
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb show
Get the details of an Azure Cosmos DB database account.
az cosmosdb show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get the details of an Azure Cosmos DB database account. (autogenerated)
az cosmosdb show --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Cosmos DB database account.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb update
Update an Azure Cosmos DB database account.
az cosmosdb update [--analytical-storage-schema-type {FullFidelity, WellDefined}]
[--backup-interval]
[--backup-policy-type {Continuous, Periodic}]
[--backup-redundancy {Geo, Local, Zone}]
[--backup-retention]
[--capabilities]
[--continuous-tier {Continuous30Days, Continuous7Days}]
[--default-consistency-level {BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong}]
[--default-identity]
[--default-priority-level {High, Low}]
[--disable-key-based-metadata-write-access {false, true}]
[--enable-analytical-storage {false, true}]
[--enable-automatic-failover {false, true}]
[--enable-burst-capacity {false, true}]
[--enable-materialized-views {false, true}]
[--enable-multiple-write-locations {false, true}]
[--enable-partition-merge {false, true}]
[--enable-pbe {false, true}]
[--enable-prpp-autoscale {false, true}]
[--enable-virtual-network {false, true}]
[--ids]
[--ip-range-filter]
[--locations]
[--max-interval]
[--max-staleness-prefix]
[--name]
[--network-acl-bypass {AzureServices, None}]
[--network-acl-bypass-resource-ids]
[--public-network-access {DISABLED, ENABLED, SECUREDBYPERIMETER}]
[--resource-group]
[--server-version {3.2, 3.6, 4.0, 4.2}]
[--subscription]
[--tags]
[--virtual-network-rules]
Examples
Update an Azure Cosmos DB database account. (autogenerated)
az cosmosdb update --capabilities EnableGremlin --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup
Update an Azure Cosmos DB database account to enable materialized views.
az cosmosdb update --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --enable-materialized-views true
Optional Parameters
Schema type for analytical storage.
The frequency(in minutes) with which backups are taken (only for accounts with periodic mode backups).
The type of backup policy of the account to create.
The redundancy type of the backup Storage account.
The time(in hours) for which each backup is retained (only for accounts with periodic mode backups).
Set custom capabilities on the Cosmos DB database account.
The tier of Continuous backup.
Default consistency level of the Cosmos DB database account.
The primary identity to access key vault in CMK related features. e.g. 'FirstPartyIdentity', 'SystemAssignedIdentity' and more.
Default Priority Level of Request if not specified.
Disable write operations on metadata resources (databases, containers, throughput) via account keys.
Flag to enable log storage on the account.
Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
Flag to enable burst capacity on the account.
Flag to enable MaterializedViews on the account.
Enable Multiple Write Locations.
Flag to enable partition merge on the account.
Flag to enable priority based execution on the account.
Enable or disable PerRegionPerPartitionAutoscale.
Enables virtual network on the Cosmos DB database account.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Firewall support. Specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma-separated and must not contain any spaces.
Add a location to the Cosmos DB database account.
Usage: --locations KEY=VALUE [KEY=VALUE ...]
Required Keys: regionName, failoverPriority
Optional Key: isZoneRedundant
Default: single region account in the location of the specified resource group.
Failover priority values are 0 for write regions and greater than 0 for read regions. A failover priority value must be unique and less than the total number of regions.
Multiple locations can be specified by using more than one --locations
argument.
When used with Bounded Staleness consistency, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 1 - 100.
When used with Bounded Staleness consistency, this value represents the number of stale requests tolerated. Accepted range for this value is 1 - 2,147,483,647.
Name of the Cosmos DB database account.
Flag to enable or disable Network Acl Bypass.
List of Resource Ids to allow Network Acl Bypass.
Sets public network access in server to either Enabled, Disabled, or SecuredByPerimeter.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Valid only for MongoDB accounts.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
ACL's for virtual network.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for