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

az blueprint resource-group

注意

此参考是 Azure CLI(版本 2.50.0 或更高版本)的蓝图扩展的一部分。 该扩展将在首次运行 az blueprint resource-group 命令时自动安装。 详细了解扩展。

用于管理蓝图资源组项目的命令。

命令

名称 说明 类型 状态
az blueprint resource-group add

将资源组项目添加到蓝图。

扩展 GA
az blueprint resource-group list

列出蓝图资源组项目。

扩展 GA
az blueprint resource-group remove

删除蓝图资源组项目。

分机 GA
az blueprint resource-group show

显示蓝图资源组项目。

分机 GA
az blueprint resource-group update

更新蓝图资源组项目。

分机 GA

az blueprint resource-group add

将资源组项目添加到蓝图。

az blueprint resource-group add --blueprint-name
                                [--artifact-name]
                                [--depends-on]
                                [--description]
                                [--display-name]
                                [--management-group]
                                [--rg-location]
                                [--rg-name]
                                [--subscription]
                                [--tags]

示例

添加资源组项目

az blueprint resource-group add \
--blueprint-name MyBlueprint --artifact-name MyResourceGroupArt

必需参数

--blueprint-name

蓝图定义的名称。

可选参数

--artifact-name

此资源组项目的唯一名称。

--depends-on

需要在指定项目之前部署的项目。

--description

蓝图项目的说明。

--display-name

此资源组项目的显示名称。

--management-group -m

将管理组用于蓝图的范围。

--rg-location

此资源组的位置。 如果在蓝图分配期间指定资源组位置,则保留为空。

--rg-name

此资源组的名称。 如果在蓝图分配期间指定资源组名称,则保留为空。

--subscription -s

将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。

--tags

要分配给此资源组的标记。

全局参数
--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 blueprint resource-group list

列出蓝图资源组项目。

az blueprint resource-group list --blueprint-name
                                 [--management-group]
                                 [--subscription]

示例

列出资源组项目

az blueprint resource-group list \
--blueprint-name MyBlueprint

必需参数

--blueprint-name

蓝图定义的名称。

可选参数

--management-group -m

将管理组用于蓝图的范围。

--subscription -s

将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。

全局参数
--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 blueprint resource-group remove

删除蓝图资源组项目。

az blueprint resource-group remove --artifact-name
                                   --blueprint-name
                                   [--management-group]
                                   [--subscription]
                                   [--yes]

示例

删除资源组项目

az blueprint resource-group remove \
--blueprint-name MyBlueprint --artifact-name MyResourceGroupArt

必需参数

--artifact-name

此资源组项目的唯一名称。

--blueprint-name

蓝图定义的名称。

可选参数

--management-group -m

将管理组用于蓝图的范围。

--subscription -s

将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。

--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 blueprint resource-group show

显示蓝图资源组项目。

az blueprint resource-group show --artifact-name
                                 --blueprint-name
                                 [--management-group]
                                 [--subscription]

示例

显示资源组项目

az blueprint resource-group show \
--blueprint-name MyBlueprint --artifact-name MyResourceGroupArt

必需参数

--artifact-name

此资源组项目的唯一名称。

--blueprint-name

蓝图定义的名称。

可选参数

--management-group -m

将管理组用于蓝图的范围。

--subscription -s

将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。

全局参数
--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 blueprint resource-group update

更新蓝图资源组项目。

az blueprint resource-group update --artifact-name
                                   --blueprint-name
                                   [--depends-on]
                                   [--description]
                                   [--display-name]
                                   [--management-group]
                                   [--rg-location]
                                   [--rg-name]
                                   [--subscription]
                                   [--tags]

示例

更新资源组项目

az blueprint resource-group update \
--blueprint-name MyBlueprint --artifact-name MyResourceGroupArt --display-name "My Resource Group"

必需参数

--artifact-name

此资源组项目的唯一名称。

--blueprint-name

蓝图定义的名称。

可选参数

--depends-on

需要在指定项目之前部署的项目。 使用不带值的“--depends-on”删除依赖项。

--description

蓝图项目的说明。

--display-name

此资源组项目的显示名称。

--management-group -m

将管理组用于蓝图的范围。

--rg-location

此资源组的位置。 如果在蓝图分配期间指定资源组位置,则保留为空。

--rg-name

此资源组的名称。 如果在蓝图分配期间指定资源组名称,则保留为空。

--subscription -s

将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。

--tags

要分配给此资源组的标记。

全局参数
--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 获取完整的调试日志。