az documentdb mongocluster
注释
此引用是 Azure CLI (版本 2.75.0 或更高版本)的 documentdb 扩展的一部分。 该扩展将在首次运行 az documentdb mongocluster 命令时自动安装。 了解更多关于扩展程序的信息。
命令组“az documentdb”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
管理 Azure DocumentDB mongo 群集。
命令
az documentdb mongocluster check-name-availability
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
检查 Mongo 群集名称是否可用。
az documentdb mongocluster check-name-availability [--acquire-policy-token]
[--change-reference]
[--ids]
[--location]
[--name]
[--subscription]
[--type]
示例
检查 Mongo 群集名称是否可用。
az documentdb mongocluster check-name-availability --location eastus --name MyCluster
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Location.
az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
需要检查其可用性的资源的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Body Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源类型。
| 属性 | 值 |
|---|---|
| 参数组: | Body Arguments |
| 默认值: | Microsoft.DocumentDB/mongoClusters |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster create
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
创建 mongo 群集。 更新将覆盖资源的所有属性。 若要仅修改某些属性,请使用 PATCH。
az documentdb mongocluster create --admin-password --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]
示例
使用高级 SSD v2 存储创建 Mongo 群集。
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
必需参数
管理员密码。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Administrator Arguments |
管理员用户名。
| 属性 | 值 |
|---|---|
| 参数组: | Administrator Arguments |
mongo 群集的名称。
为群集请求的目标高可用性模式。
| 属性 | 值 |
|---|---|
| 参数组: | HighAvailability Arguments |
| 接受的值: | Disabled, SameZone, ZoneRedundantPreferred |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
在群集上预配的分片数。
| 属性 | 值 |
|---|---|
| 参数组: | Sharding Arguments |
分配给每个服务器的数据磁盘的大小。
| 属性 | 值 |
|---|---|
| 参数组: | Storage Arguments |
要分配给群集的计算层,其中每个层映射到虚拟核心和内存大小。 示例值:“M30”、“M40”。
| 属性 | 值 |
|---|---|
| 参数组: | Compute Arguments |
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
用于数据访问的允许身份验证模式的空间分隔列表。 允许的值:NativeAuth、MicrosoftEntraID。 示例:--auth-allowed-modes NativeAuth MicrosoftEntraID 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | AuthConfig Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
启用或禁用群集上的 Mongo 数据 API。 允许的值:“Enabled”、“Disabled”。 示例:已启用 --data-api-mode。
| 属性 | 值 |
|---|---|
| 参数组: | DataApi Arguments |
| 接受的值: | Disabled, Enabled |
集群的加密配置。 取决于正在配置的标识。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
未指定资源所在的地理位置,将使用资源组的位置。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Arguments |
设置用户托管标识。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Identity Arguments |
集群的网络绕过模式。 设置为“AzureCosmosDB”可以让 Azure Cosmos DB 服务绕过网络限制。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
| 接受的值: | AzureCosmosDB, None |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
在群集上启用的预览功能的空间分隔列表。 预览功能名称为自由格式字符串;请参阅 Mongo 群集功能文档,了解当前可用的值。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
是否允许此 mongo 群集访问公共终结点。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
| 接受的值: | Disabled, Enabled |
Mongo DB 服务器版本。 如果未指定,则默认为最新可用版本。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
用于预置集群服务器的存储类型。
| 属性 | 值 |
|---|---|
| 参数组: | Storage Arguments |
| 接受的值: | PremiumSSD, PremiumSSDv2 |
资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster delete
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
删除 mongo 群集。
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]
示例
删除 mongo 群集。
az documentdb mongocluster delete -n MyCluster -g MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
mongo 群集的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不请求确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster list
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
列出给定订阅中的所有 mongo 群集。
az documentdb mongocluster list [--max-items]
[--next-token]
[--resource-group]
示例
列出资源组中的所有 mongo 群集。
az documentdb mongocluster list -g MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的 --next-token 参数中提供令牌值。
| 属性 | 值 |
|---|---|
| 参数组: | Pagination Arguments |
用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。
| 属性 | 值 |
|---|---|
| 参数组: | Pagination Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster list-connection-strings
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
列出 mongo 群集连接字符串。 这包括使用 SCRAM-SHA-256 的默认连接字符串,以及群集支持的其他连接字符串。
az documentdb mongocluster list-connection-strings [--acquire-policy-token]
[--change-reference]
[--cluster-name]
[--ids]
[--resource-group]
[--subscription]
示例
列出 Mongo 群集的连接字符串。
az documentdb mongocluster list-connection-strings --cluster-name MyCluster -g MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
mongo 群集的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster reset-password
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
重置 Mongo 群集的管理员密码。
az documentdb mongocluster reset-password --admin-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]
示例
重置管理员密码。
az documentdb mongocluster reset-password -n MyCluster -g MyResourceGroup --admin-password NewP@ssw0rd123!
必需参数
新的管理员密码。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Administrator Arguments |
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
mongo 群集的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster restore
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
从某个时间点将 Mongo 群集还原到新群集。
在请求的时间点从现有(或删除)源群集的备份创建新的 mongo 群集。 支持的目标配置选项包括本机身份验证、客户管理的密钥加密、用户分配的托管标识、存储类型、公用网络访问和资源标记。 此命令不支持服务器版本、计算层、存储大小、分片计数、高可用性、数据 API、网络绕过和预览功能替代。 配置Microsoft Entra ID身份验证并在还原完成后分配用户,使还原权限与数据访问授权分开。
az documentdb mongocluster restore --cluster-name --name
--resource-group
--restore-time
--source-cluster
[--acquire-policy-token]
[--admin-password --password]
[--admin-user]
[--auth-allowed-modes]
[--change-reference]
[--encryption]
[--location]
[--mi-user-assigned --user-assigned]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--public-network-access {Disabled, Enabled}]
[--storage-type {PremiumSSD, PremiumSSDv2}]
[--tags]
示例
使用本机身份验证还原群集。
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!
使用存储类型和公用网络访问设置还原群集。
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! --storage-type PremiumSSDv2 --public-network-access Disabled
使用资源标记还原群集。
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! --tags environment=restored team=documentdb
必需参数
mongo 群集的名称。
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
要从中还原的 UTC 时间点,采用 ISO-8601 格式(例如:2026-06-30T10:00:00Z)。
| 属性 | 值 |
|---|---|
| 参数组: | Restore Arguments |
要从中还原的源 mongo 群集的名称或资源 ID。 如果指定了名称,则假定当前订阅和资源组。
| 属性 | 值 |
|---|---|
| 参数组: | Restore Arguments |
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
管理员密码。 NativeAuth 是必需的,包括使用 NativeAuth 的 CMK 还原。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Administrator Arguments |
管理员用户名。 NativeAuth 是必需的,包括使用 NativeAuth 的 CMK 还原。
| 属性 | 值 |
|---|---|
| 参数组: | Administrator Arguments |
已还原群集的身份验证模式。 仅支持 NativeAuth。 配置Microsoft Entra ID身份验证并在还原后分配用户。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | AuthConfig Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
集群的加密配置。 取决于正在配置的标识。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
未指定资源所在的地理位置,将使用资源组的位置。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Arguments |
设置用户托管标识。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Identity Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
已还原群集的公用网络访问设置。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
| 接受的值: | Disabled, Enabled |
已还原群集的存储类型。
| 属性 | 值 |
|---|---|
| 参数组: | Storage Arguments |
| 接受的值: | PremiumSSD, PremiumSSDv2 |
已还原群集的资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster show
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
获取有关 mongo 群集的信息。
az documentdb mongocluster show [--cluster-name --name]
[--ids]
[--resource-group]
[--subscription]
示例
获取有关 mongo 群集的信息。
az documentdb mongocluster show -n MyCluster -g MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
mongo 群集的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster update
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
更新 mongo 群集。 仅修改请求中指定的属性;所有其他属性保持不变(HTTP PATCH)。 支持泛型更新参数(--set、--add、--remove)。
az documentdb mongocluster update [--acquire-policy-token]
[--add]
[--admin-password --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]
示例
更新 mongo 群集的计算层。
az documentdb mongocluster update -n MyCluster -g MyResourceGroup --tier M40
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
管理员密码。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Administrator Arguments |
管理员用户名。
| 属性 | 值 |
|---|---|
| 参数组: | Administrator Arguments |
用于数据访问的允许身份验证模式的空间分隔列表。 允许的值:NativeAuth、MicrosoftEntraID。 示例:--auth-allowed-modes NativeAuth MicrosoftEntraID 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | AuthConfig Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
mongo 群集的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
启用或禁用群集上的 Mongo 数据 API。 允许的值:“Enabled”、“Disabled”。 示例:已启用 --data-api-mode。
| 属性 | 值 |
|---|---|
| 参数组: | DataApi Arguments |
| 接受的值: | Disabled, Enabled |
集群的加密配置。 取决于正在配置的标识。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
为群集请求的目标高可用性模式。
| 属性 | 值 |
|---|---|
| 参数组: | HighAvailability Arguments |
| 接受的值: | Disabled, SameZone, ZoneRedundantPreferred |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
集群的网络绕过模式。 设置为“AzureCosmosDB”可以让 Azure Cosmos DB 服务绕过网络限制。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
| 接受的值: | AzureCosmosDB, None |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
在群集上启用的预览功能的空间分隔列表。 预览功能名称为自由格式字符串;请参阅 Mongo 群集功能文档,了解当前可用的值。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
是否允许此 mongo 群集访问公共终结点。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
| 接受的值: | Disabled, Enabled |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Mongo DB 服务器版本。 如果未指定,则默认为最新可用版本。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>。
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
在群集上预配的分片数。
| 属性 | 值 |
|---|---|
| 参数组: | Sharding Arguments |
分配给每个服务器的数据磁盘的大小。
| 属性 | 值 |
|---|---|
| 参数组: | Storage Arguments |
用于预置集群服务器的存储类型。
| 属性 | 值 |
|---|---|
| 参数组: | Storage Arguments |
| 接受的值: | PremiumSSD, PremiumSSDv2 |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Arguments |
要分配给群集的计算层,其中每个层映射到虚拟核心和内存大小。 示例值:“M30”、“M40”。
| 属性 | 值 |
|---|---|
| 参数组: | Compute Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az documentdb mongocluster wait
命令组“az documentdb mongocluster”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
将 CLI 置于等待状态,直到满足条件。
az documentdb mongocluster wait [--acquire-policy-token]
[--change-reference]
[--cluster-name --name]
[--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
mongo 群集的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
等待在“Succeeded”中使用“provisioningState”创建。
| 属性 | 值 |
|---|---|
| 参数组: | Wait Condition Arguments |
| 默认值: | False |
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 属性 | 值 |
|---|---|
| 参数组: | Wait Condition Arguments |
等到删除为止。
| 属性 | 值 |
|---|---|
| 参数组: | Wait Condition Arguments |
| 默认值: | False |
等待资源存在。
| 属性 | 值 |
|---|---|
| 参数组: | Wait Condition Arguments |
| 默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
轮询间隔(以秒为单位)。
| 属性 | 值 |
|---|---|
| 参数组: | Wait Condition Arguments |
| 默认值: | 30 |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
最大等待(以秒为单位)。
| 属性 | 值 |
|---|---|
| 参数组: | Wait Condition Arguments |
| 默认值: | 3600 |
等到 provisioningState 更新为“Succeeded”。
| 属性 | 值 |
|---|---|
| 参数组: | Wait Condition Arguments |
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |