az documentdb mongocluster
Note
This reference is part of the documentdb extension for the Azure CLI (version 2.75.0 or higher). The extension will automatically install the first time you run an az documentdb mongocluster command. Learn more about extensions.
Manage Mongo Cluster.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az documentdb mongocluster check-name-availability |
Check if mongo cluster name is available for use. |
Extension | GA |
| az documentdb mongocluster create |
Create a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. |
Extension | GA |
| az documentdb mongocluster delete |
Delete a mongo cluster. |
Extension | GA |
| az documentdb mongocluster firewall-rule |
Manage Firewall Rule. |
Extension | GA |
| az documentdb mongocluster firewall-rule create |
Create a new firewall rule or updates an existing firewall rule on a mongo cluster. |
Extension | GA |
| az documentdb mongocluster firewall-rule delete |
Delete a mongo cluster firewall rule. |
Extension | GA |
| az documentdb mongocluster firewall-rule list |
List all the firewall rules in a given mongo cluster. |
Extension | GA |
| az documentdb mongocluster firewall-rule show |
Get information about a mongo cluster firewall rule. |
Extension | GA |
| az documentdb mongocluster firewall-rule update |
Update a new firewall rule or updates an existing firewall rule on a mongo cluster. |
Extension | GA |
| az documentdb mongocluster firewall-rule wait |
Place the CLI in a waiting state until a condition is met. |
Extension | GA |
| az documentdb mongocluster identity |
Manage Identity. |
Extension | GA |
| az documentdb mongocluster identity assign |
Assign the user or system managed identities. |
Extension | GA |
| az documentdb mongocluster identity remove |
Remove the user or system managed identities. |
Extension | GA |
| az documentdb mongocluster identity show |
Show the details of managed identities. |
Extension | GA |
| az documentdb mongocluster identity wait |
Place the CLI in a waiting state until a condition is met. |
Extension | GA |
| az documentdb mongocluster list |
List all the mongo clusters in a given subscription. |
Extension | GA |
| az documentdb mongocluster list-connection-strings |
List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. |
Extension | GA |
| az documentdb mongocluster replica |
Manage Replica. |
Extension | GA |
| az documentdb mongocluster replica create |
Create a cross-region read replica of an existing mongo cluster. |
Extension | GA |
| az documentdb mongocluster replica list |
List all the replicas for the mongo cluster. |
Extension | GA |
| az documentdb mongocluster replica promote |
Promotes a replica mongo cluster to a primary role. |
Extension | GA |
| az documentdb mongocluster reset-password |
Reset the administrator password of a mongo cluster. |
Extension | GA |
| az documentdb mongocluster restore |
Restore a mongo cluster to a new cluster from a point in time. |
Extension | GA |
| az documentdb mongocluster show |
Get information about a mongo cluster. |
Extension | GA |
| az documentdb mongocluster update |
Update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. |
Extension | GA |
| az documentdb mongocluster user |
Manage User. |
Extension | GA |
| az documentdb mongocluster user create |
Create a new user or updates an existing user on a mongo cluster. |
Extension | GA |
| az documentdb mongocluster user delete |
Delete a mongo cluster user. |
Extension | GA |
| az documentdb mongocluster user list |
List all the users on a mongo cluster. |
Extension | GA |
| az documentdb mongocluster user show |
Get the defintion of a Mongo cluster user. |
Extension | GA |
| az documentdb mongocluster user update |
Update a new user or updates an existing user on a mongo cluster. |
Extension | GA |
| az documentdb mongocluster user wait |
Place the CLI in a waiting state until a condition is met. |
Extension | GA |
| az documentdb mongocluster wait |
Place the CLI in a waiting state until a condition is met. |
Extension | GA |
az documentdb mongocluster check-name-availability
Check if mongo cluster name is available for use.
az documentdb mongocluster check-name-availability [--acquire-policy-token]
[--change-reference]
[--ids]
[--location]
[--name]
[--subscription]
[--type]
Examples
Check if a mongo cluster name is available.
az documentdb mongocluster check-name-availability --location eastus --name MyCluster
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the resource for which availability needs to be checked.
| Property | Value |
|---|---|
| Parameter group: | Body Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The resource type.
| Property | Value |
|---|---|
| Parameter group: | Body Arguments |
| Default value: | Microsoft.DocumentDB/mongoClusters |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster create
Create a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH.
az documentdb mongocluster create --admin-password
--admin-user
--cluster-name --name
--high-availability {Disabled, SameZone, ZoneRedundantPreferred}
--resource-group
--shard-count
--storage-size
--tier
[--acquire-policy-token]
[--auth-allowed-modes]
[--change-reference]
[--data-api-mode {Disabled, Enabled}]
[--encryption]
[--location]
[--mi-user-assigned --user-assigned]
[--network-bypass-mode {AzureCosmosDB, None}]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--preview-features]
[--public-network-access {Disabled, Enabled}]
[--server-version]
[--storage-type {PremiumSSD, PremiumSSDv2}]
[--tags]
Examples
Create a mongo cluster with Premium SSD v2 storage.
az documentdb mongocluster create -n MyCluster -g MyResourceGroup --location eastus --admin-user dbadmin --admin-password MyP@ssw0rd123! --tier M30 --storage-size 128 --storage-type PremiumSSDv2 --shard-count 1 --high-availability Disabled
Required Parameters
The administrator password. If value is blank it's asked from the tty.
| Property | Value |
|---|---|
| Parameter group: | Administrator Arguments |
The administrator user name.
| Property | Value |
|---|---|
| Parameter group: | Administrator Arguments |
The name of the mongo cluster.
The target high availability mode requested for the cluster.
| Property | Value |
|---|---|
| Parameter group: | HighAvailability Arguments |
| Accepted values: | Disabled, SameZone, ZoneRedundantPreferred |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Number of shards to provision on the cluster.
| Property | Value |
|---|---|
| Parameter group: | Sharding Arguments |
The size of the data disk assigned to each server.
| Property | Value |
|---|---|
| Parameter group: | Storage Arguments |
The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory size. Example values: 'M30', 'M40'.
| Property | Value |
|---|---|
| Parameter group: | Compute Arguments |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Space-separated list of allowed authentication modes for data access. Allowed values: NativeAuth, MicrosoftEntraID. Example: --auth-allowed-modes NativeAuth MicrosoftEntraID Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | AuthConfig Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Enable or disable the Mongo Data API on the cluster. Allowed values: Enabled, Disabled. Example: --data-api-mode Enabled.
| Property | Value |
|---|---|
| Parameter group: | DataApi Arguments |
| Accepted values: | Disabled, Enabled |
The encryption configuration for the cluster. Depends on identity being configured. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The geo-location where the resource lives When not specified, the location of the resource group will be used.
| Property | Value |
|---|---|
| Parameter group: | Resource Arguments |
Set the user managed identities. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Identity Arguments |
The network bypass mode for the cluster. Setting to 'AzureCosmosDB' allows Azure Cosmos DB service to bypass network restrictions.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | AzureCosmosDB, None |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
List of private endpoint connections. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Whether or not public endpoint access is allowed for this mongo cluster.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Disabled, Enabled |
The Mongo DB server version. Defaults to the latest available version if not specified.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The type of storage to provision the cluster servers with.
| Property | Value |
|---|---|
| Parameter group: | Storage Arguments |
| Accepted values: | PremiumSSD, PremiumSSDv2 |
Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Resource Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster delete
Delete a mongo cluster.
az documentdb mongocluster delete [--acquire-policy-token]
[--change-reference]
[--cluster-name --name]
[--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete a mongo cluster.
az documentdb mongocluster delete -n MyCluster -g MyResourceGroup
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The name of the mongo cluster.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster list
List all the mongo clusters in a given subscription.
az documentdb mongocluster list [--max-items]
[--next-token]
[--resource-group]
Examples
List all mongo clusters in a resource group.
az documentdb mongocluster list -g MyResourceGroup
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.
| Property | Value |
|---|---|
| Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
| Property | Value |
|---|---|
| Parameter group: | Pagination Arguments |
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.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster list-connection-strings
List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster.
az documentdb mongocluster list-connection-strings [--acquire-policy-token]
[--change-reference]
[--cluster-name]
[--ids]
[--resource-group]
[--subscription]
Examples
List the connection strings for a mongo cluster.
az documentdb mongocluster list-connection-strings --cluster-name MyCluster -g MyResourceGroup
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The name of the mongo cluster.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster reset-password
Reset the administrator password of a mongo cluster.
az documentdb mongocluster reset-password --password
[--acquire-policy-token]
[--change-reference]
[--cluster-name --name]
[--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
Examples
Reset the administrator password.
az documentdb mongocluster reset-password -n MyCluster -g MyResourceGroup --password NewP@ssw0rd123!
Required Parameters
The new administrator password. If value is blank it's asked from the tty.
| Property | Value |
|---|---|
| Parameter group: | Administrator Arguments |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The name of the mongo cluster.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster restore
Restore a mongo cluster to a new cluster from a point in time.
Creates a new mongo cluster from the backup of an existing (or deleted) source cluster at the requested point in time.
az documentdb mongocluster restore --admin-password
--admin-user
--cluster-name --name
--resource-group
--restore-time
--source-cluster
[--acquire-policy-token]
[--change-reference]
[--location]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
Examples
Restore a cluster to a point in time.
az documentdb mongocluster restore -n RestoredCluster -g MyResourceGroup --location eastus2 --source-cluster MySourceCluster --restore-time "2026-06-30T10:00:00Z" --admin-user dbadmin --admin-password MyP@ssw0rd123!
Required Parameters
The administrator password. If value is blank it's asked from the tty.
| Property | Value |
|---|---|
| Parameter group: | Administrator Arguments |
The administrator user name.
| Property | Value |
|---|---|
| Parameter group: | Administrator Arguments |
The name of the mongo cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
UTC point in time to restore from, in ISO-8601 format (for example: 2026-06-30T10:00:00Z).
| Property | Value |
|---|---|
| Parameter group: | Restore Arguments |
Name or resource ID of the source mongo cluster to restore from. If a name is given, the current subscription and resource group are assumed.
| Property | Value |
|---|---|
| Parameter group: | Restore Arguments |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The geo-location where the resource lives When not specified, the location of the resource group will be used.
| Property | Value |
|---|---|
| Parameter group: | Resource Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster show
Get information about a mongo cluster.
az documentdb mongocluster show [--cluster-name --name]
[--ids]
[--resource-group]
[--subscription]
Examples
Get information about a mongo cluster.
az documentdb mongocluster show -n MyCluster -g MyResourceGroup
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of the mongo cluster.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster update
Update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH.
az documentdb mongocluster update [--acquire-policy-token]
[--add]
[--admin-password]
[--admin-user]
[--auth-allowed-modes]
[--change-reference]
[--cluster-name --name]
[--data-api-mode {Disabled, Enabled}]
[--encryption]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--high-availability {Disabled, SameZone, ZoneRedundantPreferred}]
[--ids]
[--network-bypass-mode {AzureCosmosDB, None}]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--preview-features]
[--public-network-access {Disabled, Enabled}]
[--remove]
[--resource-group]
[--server-version]
[--set]
[--shard-count]
[--storage-size]
[--storage-type {PremiumSSD, PremiumSSDv2}]
[--subscription]
[--tags]
[--tier]
Examples
Update a mongo cluster's compute tier.
az documentdb mongocluster update -n MyCluster -g MyResourceGroup --tier M40
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
The administrator password. If value is blank it's asked from the tty.
| Property | Value |
|---|---|
| Parameter group: | Administrator Arguments |
The administrator user name.
| Property | Value |
|---|---|
| Parameter group: | Administrator Arguments |
Space-separated list of allowed authentication modes for data access. Allowed values: NativeAuth, MicrosoftEntraID. Example: --auth-allowed-modes NativeAuth MicrosoftEntraID Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | AuthConfig Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The name of the mongo cluster.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Enable or disable the Mongo Data API on the cluster. Allowed values: Enabled, Disabled. Example: --data-api-mode Enabled.
| Property | Value |
|---|---|
| Parameter group: | DataApi Arguments |
| Accepted values: | Disabled, Enabled |
The encryption configuration for the cluster. Depends on identity being configured. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
The target high availability mode requested for the cluster.
| Property | Value |
|---|---|
| Parameter group: | HighAvailability Arguments |
| Accepted values: | Disabled, SameZone, ZoneRedundantPreferred |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The network bypass mode for the cluster. Setting to 'AzureCosmosDB' allows Azure Cosmos DB service to bypass network restrictions.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | AzureCosmosDB, None |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
List of private endpoint connections. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Whether or not public endpoint access is allowed for this mongo cluster.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Disabled, Enabled |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The Mongo DB server version. Defaults to the latest available version if not specified.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Number of shards to provision on the cluster.
| Property | Value |
|---|---|
| Parameter group: | Sharding Arguments |
The size of the data disk assigned to each server.
| Property | Value |
|---|---|
| Parameter group: | Storage Arguments |
The type of storage to provision the cluster servers with.
| Property | Value |
|---|---|
| Parameter group: | Storage Arguments |
| Accepted values: | PremiumSSD, PremiumSSDv2 |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Resource Arguments |
The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory size. Example values: 'M30', 'M40'.
| Property | Value |
|---|---|
| Parameter group: | Compute Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az documentdb mongocluster wait
Place the CLI in a waiting state until a condition is met.
az documentdb mongocluster wait [--acquire-policy-token]
[--change-reference]
[--cluster-name --name]
[--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The name of the mongo cluster.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Wait until created with 'provisioningState' at 'Succeeded'.
| Property | Value |
|---|---|
| Parameter group: | Wait Condition Arguments |
| Default value: | False |
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
| Property | Value |
|---|---|
| Parameter group: | Wait Condition Arguments |
Wait until deleted.
| Property | Value |
|---|---|
| Parameter group: | Wait Condition Arguments |
| Default value: | False |
Wait until the resource exists.
| Property | Value |
|---|---|
| Parameter group: | Wait Condition Arguments |
| Default value: | False |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Polling interval in seconds.
| Property | Value |
|---|---|
| Parameter group: | Wait Condition Arguments |
| Default value: | 30 |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Maximum wait in seconds.
| Property | Value |
|---|---|
| Parameter group: | Wait Condition Arguments |
| Default value: | 3600 |
Wait until updated with provisioningState at 'Succeeded'.
| Property | Value |
|---|---|
| Parameter group: | Wait Condition Arguments |
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |