你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az cosmosdb mongocluster firewall rule

注意

此参考是 Azure CLI(版本 2.17.1 或更高版本)的 cosmosdb-preview 扩展的一部分。 该扩展将在首次运行 az cosmosdb mongocluster 防火墙规则 命令时自动安装。 详细了解扩展。

命令组“cosmosdb mongocluster”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

Mongo 群集防火墙规则。

命令

名称 说明 类型 状态
az cosmosdb mongocluster firewall rule create

创建 Mongo 群集防火墙规则。

扩展 预览
az cosmosdb mongocluster firewall rule delete

删除 Mongo 群集防火墙规则。

分机 预览版
az cosmosdb mongocluster firewall rule list

列出 Mongo 群集上的防火墙规则。

扩展 预览版
az cosmosdb mongocluster firewall rule show

获取 Mongo 群集防火墙规则。

分机 预览版
az cosmosdb mongocluster firewall rule update

创建 Mongo 群集防火墙规则。

分机 预览

az cosmosdb mongocluster firewall rule create

预览

命令组“cosmosdb mongocluster 防火墙规则”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

创建 Mongo 群集防火墙规则。

az cosmosdb mongocluster firewall rule create --cluster-name
                                              --end-ip-address
                                              --resource-group
                                              --rule-name
                                              --start-ip-address

示例

创建 Mongo 群集防火墙规则。

az cosmosdb mongocluster firewall rule create \
--cluster-name MyCluster \
--resource-group MyResourceGroup \
--rule-name MyRule \
--start-ip-address MyStartIpAddress \
--end-ip-address MyEndIpAddress \

必需参数

--cluster-name -c

Cosmos DB Mongo 群集的名称。

--end-ip-address

防火墙规则的结束 IP 地址。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--rule-name

防火墙规则的名称。

--start-ip-address

防火墙规则的起始 IP 地址。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb mongocluster firewall rule delete

预览

命令组“cosmosdb mongocluster 防火墙规则”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

删除 Mongo 群集防火墙规则。

az cosmosdb mongocluster firewall rule delete --cluster-name
                                              --resource-group
                                              --rule-name
                                              [--yes]

示例

删除 Mongo 群集防火墙规则。 如果防火墙规则不存在,则返回 NoContent 响应。

az cosmosdb mongocluster firewall rule delete --cluster-name MyCluster --resource-group MyResourceGroup --rule-name MyRuleName

必需参数

--cluster-name -c

Cosmos DB Mongo 群集的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--rule-name

防火墙规则的名称。

可选参数

--yes -y

不提示确认。

默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb mongocluster firewall rule list

预览

命令组“cosmosdb mongocluster 防火墙规则”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

列出 Mongo 群集上的防火墙规则。

az cosmosdb mongocluster firewall rule list --cluster-name
                                            --resource-group

示例

列出资源组中的 Mongo 群集防火墙规则。

az cosmosdb mongocluster firewall rule list --cluster-name MyCluster --resource-group MyResourceGroup

必需参数

--cluster-name -c

Cosmos DB Mongo 群集的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb mongocluster firewall rule show

预览

命令组“cosmosdb mongocluster 防火墙规则”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

获取 Mongo 群集防火墙规则。

az cosmosdb mongocluster firewall rule show --cluster-name
                                            --resource-group
                                            --rule-name

示例

获取 Mongo 群集防火墙规则。 如果防火墙规则不存在,则返回 NotFound 响应。

az cosmosdb mongocluster firewall rule show --cluster-name MyCluster --resource-group MyResourceGroup --rule-name MyRuleName

必需参数

--cluster-name -c

Cosmos DB Mongo 群集的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--rule-name

防火墙规则的名称。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb mongocluster firewall rule update

预览

命令组“cosmosdb mongocluster 防火墙规则”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

创建 Mongo 群集防火墙规则。

az cosmosdb mongocluster firewall rule update --cluster-name
                                              --end-ip-address
                                              --resource-group
                                              --rule-name
                                              --start-ip-address

示例

更新 Mongo 群集防火墙规则。

az cosmosdb mongocluster firewall rule update \
--cluster-name MyCluster \
--resource-group MyResourceGroup \
--rule-name MyRule \
--start-ip-address MyStartIpAddress \
--end-ip-address MyEndIpAddress \

必需参数

--cluster-name -c

Cosmos DB Mongo 群集的名称。

--end-ip-address

防火墙规则的结束 IP 地址。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--rule-name

防火墙规则的名称。

--start-ip-address

防火墙规则的起始 IP 地址。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。