az blueprint
Note
此参考是 Azure CLI(版本 2.50.0 或更高版本)的 蓝图 扩展的一部分。 该扩展将在首次运行 az blueprint 命令时自动安装。 了解更多关于扩展的信息。
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令组已弃用,将在计划于 2025 年 11 月发布的下一个中断性变更版本(2.79.0)中删除。
用于管理蓝图的命令。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az blueprint artifact |
用于管理蓝图项目的命令。 |
Extension | GA |
| az blueprint artifact delete |
删除蓝图项目。 |
Extension | Preview |
| az blueprint artifact list |
列出给定蓝图定义的项目。 |
Extension | Preview |
| az blueprint artifact policy |
用于管理蓝图策略分配项目的命令。 |
Extension | GA |
| az blueprint artifact policy create |
创建蓝图策略项目。 |
Extension | GA |
| az blueprint artifact policy update |
更新蓝图策略项目。 |
Extension | GA |
| az blueprint artifact role |
用于管理蓝图角色分配项目的命令。 |
Extension | GA |
| az blueprint artifact role create |
创建蓝图角色项目。 |
Extension | GA |
| az blueprint artifact role update |
更新蓝图角色项目。 |
Extension | GA |
| az blueprint artifact show |
获取蓝图项目。 |
Extension | Preview |
| az blueprint artifact template |
用于管理蓝图 ARM 模板项目的命令。 |
Extension | GA |
| az blueprint artifact template create |
创建蓝图 arm 项目。 |
Extension | GA |
| az blueprint artifact template update |
更新蓝图 arm 项目。 |
Extension | GA |
| az blueprint assignment |
用于管理蓝图分配的命令。 |
Extension | GA |
| az blueprint assignment create |
创建蓝图分配。 |
Extension | GA |
| az blueprint assignment delete |
删除蓝图分配。 |
Extension | Preview |
| az blueprint assignment list |
列出订阅中的蓝图分配。 |
Extension | Preview |
| az blueprint assignment show |
获取蓝图分配。 |
Extension | Preview |
| az blueprint assignment update |
更新蓝图分配。 |
Extension | GA |
| az blueprint assignment wait |
将 CLI 置于等待状态,直到满足蓝图分配的条件。 |
Extension | GA |
| az blueprint assignment who |
获取 Blueprint Servie 主体名称 objectId。 |
Extension | Preview |
| az blueprint create |
创建蓝图定义。 |
Extension | Preview |
| az blueprint delete |
删除蓝图定义。 |
Extension | Preview |
| az blueprint export |
将蓝图定义和项目导出到 json 文件(s)。 |
Extension | GA |
| az blueprint import |
从 json 文件的直接导入蓝图定义和项目。 |
Extension | GA |
| az blueprint list |
列出蓝图定义。 |
Extension | Preview |
| az blueprint publish |
使用最新项目发布蓝图定义的新版本。 已发布的蓝图定义是不可变的。 |
Extension | Preview |
| az blueprint resource-group |
用于管理蓝图资源组项目的命令。 |
Extension | GA |
| az blueprint resource-group add |
将资源组项目添加到蓝图。 |
Extension | GA |
| az blueprint resource-group list |
列出蓝图资源组项目。 |
Extension | GA |
| az blueprint resource-group remove |
删除蓝图资源组项目。 |
Extension | GA |
| az blueprint resource-group show |
显示蓝图资源组项目。 |
Extension | GA |
| az blueprint resource-group update |
更新蓝图资源组项目。 |
Extension | GA |
| az blueprint show |
获取蓝图定义。 |
Extension | Preview |
| az blueprint update |
更新蓝图定义。 |
Extension | Preview |
| az blueprint version |
用于管理已发布蓝图版本的命令。 |
Extension | Preview |
| az blueprint version artifact |
用于管理已发布蓝图项目的命令。 |
Extension | Preview |
| az blueprint version artifact list |
列出已发布蓝图版本的项目。 |
Extension | Preview |
| az blueprint version artifact show |
显示已发布蓝图的项目。 |
Extension | Preview |
| az blueprint version delete |
删除蓝图的已发布版本。 |
Extension | Preview |
| az blueprint version list |
列出给定蓝图定义的已发布版本。 |
Extension | Preview |
| az blueprint version show |
获取蓝图的已发布版本。 |
Extension | Preview |
az blueprint create
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令已隐式弃用,因为命令组“az blueprint”已弃用,将在将来的版本中删除。
创建蓝图定义。
az blueprint create --name
--target-scope {managementGroup, subscription}
[--description]
[--display-name]
[--management-group]
[--parameters]
[--resource-groups]
[--subscription]
示例
创建订阅蓝图
az blueprint create --subscription MySubscription --name MyBlueprint --description "blueprint contains all artifacts" --target-scope subscription
创建管理组蓝图
az blueprint create --management-group MyManagementGroup --name MyBlueprint --description "blueprint contains all artifact" --target-scope subscription
必需参数
蓝图定义的名称。
可以分配此蓝图定义的作用域。
| 属性 | 值 |
|---|---|
| 接受的值: | managementGroup, subscription |
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
多行说明此资源。
单行字符串解释此资源。
将管理组用于蓝图的范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
此蓝图定义所需的参数。 它可以是 JSON 字符串或 JSON 文件路径。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
此蓝图定义定义的资源组占位符。 预期值:json-string/@json-file。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az blueprint delete
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令已隐式弃用,因为命令组“az blueprint”已弃用,将在将来的版本中删除。
删除蓝图定义。
az blueprint delete --name
[--management-group]
[--subscription]
[--yes]
示例
删除管理组蓝图
az blueprint delete --management-group MyManagementGroup --name MyBlueprint
删除订阅蓝图
az blueprint delete --subscription MySubscription --name MyBlueprint
必需参数
蓝图定义的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
将管理组用于蓝图的范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az blueprint export
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令已隐式弃用,因为命令组“az blueprint”已弃用,将在将来的版本中删除。
将蓝图定义和项目导出到 json 文件(s)。
az blueprint export --name
--output-path
[--management-group]
[--subscription]
[--yes]
示例
导出蓝图定义和项目
az blueprint export --name MyBlueprint \
--output-path "path/to/blueprint/directory"
必需参数
要导出的蓝图定义的名称。
蓝图和项目的 json 定义的目录路径。 蓝图定义文件将命名为 blueprint.json。 Artifacts json 文件将位于名为 artifacts 的子目录中。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
将管理组用于蓝图的范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
跳过用户确认。 设置时,如果目录不存在,则会创建它。 如果目录存在且包含内容,则会覆盖它们。 如果未设置,系统会提示用户继续权限。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az blueprint import
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令已隐式弃用,因为命令组“az blueprint”已弃用,将在将来的版本中删除。
从 json 文件的直接导入蓝图定义和项目。
az blueprint import --input-path
--name
[--management-group]
[--subscription]
[--yes]
示例
导入蓝图定义和项目
az blueprint import --name MyBlueprint \
--input-path "path/to/blueprint/directory"
必需参数
蓝图和项目的 json 定义的目录路径。 蓝图定义文件应命名为 blueprint.json。 项目 json 文件应位于命名项目的子目录中。
蓝图定义的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
将管理组用于蓝图的范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az blueprint list
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令已隐式弃用,因为命令组“az blueprint”已弃用,将在将来的版本中删除。
列出蓝图定义。
az blueprint list [--management-group]
[--max-items]
[--next-token]
[--subscription]
示例
列出管理组中的蓝图
az blueprint list --management-group MyManagementGroup
列出订阅中的蓝图
az blueprint list --subscription MySubscription
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
将管理组用于蓝图的范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的 --next-token 参数中提供令牌值。
| 属性 | 值 |
|---|---|
| Parameter group: | Pagination Arguments |
用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。
| 属性 | 值 |
|---|---|
| Parameter group: | Pagination Arguments |
将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az blueprint publish
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令已隐式弃用,因为命令组“az blueprint”已弃用,将在将来的版本中删除。
使用最新项目发布蓝图定义的新版本。 已发布的蓝图定义是不可变的。
az blueprint publish --blueprint-name
--version
[--change-notes]
[--management-group]
[--subscription]
示例
发布管理组蓝图
az blueprint publish --management-group MyManagementGroup --blueprint-name MyBlueprint --version v2
发布订阅蓝图
az blueprint publish --subscription MySubscription --blueprint-name MyBlueprint --version v2
必需参数
蓝图定义的名称。
已发布的蓝图定义的版本。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
特定于版本的更改说明。
将管理组用于蓝图的范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az blueprint show
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令已隐式弃用,因为命令组“az blueprint”已弃用,将在将来的版本中删除。
获取蓝图定义。
az blueprint show --name
[--management-group]
[--subscription]
示例
显示管理组蓝图
az blueprint show --management-group MyManagementGroup --name MyBlueprint
显示订阅蓝图
az blueprint show --subscription MySubscription --name MyBlueprint
必需参数
蓝图定义的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
将管理组用于蓝图的范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az blueprint update
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
蓝图和关联的命令最早将于 2026 年 7 月弃用。 我们鼓励客户在此日期之后过渡到模板规范和部署堆栈,以支持他们的使用场景。 迁移文档在 https://free.blessedness.top/en-us/azure/azure-resource-manager/bicep/migrate-blueprint提供。 此命令已隐式弃用,因为命令组“az blueprint”已弃用,将在将来的版本中删除。
更新蓝图定义。
az blueprint update --name
[--add]
[--description]
[--display-name]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--management-group]
[--parameters]
[--remove]
[--resource-groups]
[--set]
[--subscription]
[--target-scope {managementGroup, subscription}]
必需参数
蓝图定义的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
多行说明此资源。
单行字符串解释此资源。
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
将管理组用于蓝图的范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
此蓝图定义所需的参数。 它可以是 JSON 字符串或 JSON 文件路径。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
此蓝图定义定义的资源组占位符。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
将订阅用于蓝图的范围。 如果未指定 --management-group,则 --subscription 值或默认订阅将用作范围。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource_scope Arguments |
可以分配此蓝图定义的作用域。
| 属性 | 值 |
|---|---|
| 接受的值: | managementGroup, subscription |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |