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

az automanage configuration-profile version

注意

此参考是 Azure CLI(版本 2.44.1 或更高版本)的自动管理扩展的一部分。 该扩展将在首次运行 az automanage configuration-profile version 命令时自动安装。 详细了解扩展。

管理配置文件版本。

命令

名称 说明 类型 状态
az automanage configuration-profile version create

创建配置文件版本。

分机 GA
az automanage configuration-profile version delete

删除配置文件版本。

分机 GA
az automanage configuration-profile version list

列出配置文件的配置文件版本。

分机 GA
az automanage configuration-profile version show

获取有关配置文件版本的信息。

分机 GA
az automanage configuration-profile version update

更新配置文件版本。

扩展 GA

az automanage configuration-profile version create

创建配置文件版本。

az automanage configuration-profile version create --configuration-profile-name
                                                   --name
                                                   --resource-group
                                                   [--configuration]
                                                   [--location]
                                                   [--tags]

示例

创建配置文件版本

az automanage configuration-profile version create --profile-name {profile_name} -g {rg} -n {version_name} --configuration '{"Antimalware/Enable":false}'

必需参数

--configuration-profile-name --profile-name

配置文件的名称。

--name --version-name -n

配置文件版本名称。

--resource-group -g

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

可选参数

--configuration

配置文件的配置字典。 支持 json-file 和 yaml-file。

--location -l

未指定资源所在的地理位置,将使用资源组的位置。

--tags

资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

全局参数
--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 automanage configuration-profile version delete

删除配置文件版本。

az automanage configuration-profile version delete [--configuration-profile-name]
                                                   [--ids]
                                                   [--name]
                                                   [--resource-group]
                                                   [--subscription]
                                                   [--yes]

示例

删除配置文件版本

az automanage configuration-profile version delete --profile-name {profile_name} -g {rg} -n {version_name}

可选参数

--configuration-profile-name --profile-name

配置文件的名称。

--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name --version-name -n

配置文件版本名称。

--resource-group -g

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

--subscription

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

--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 automanage configuration-profile version list

列出配置文件的配置文件版本。

az automanage configuration-profile version list --configuration-profile-name
                                                 --resource-group

示例

列出配置文件版本

az automanage configuration-profile version list --profile-name {profile_name} -g {rg}

必需参数

--configuration-profile-name --profile-name

配置文件的名称。

--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 automanage configuration-profile version show

获取有关配置文件版本的信息。

az automanage configuration-profile version show [--configuration-profile-name]
                                                 [--ids]
                                                 [--name]
                                                 [--resource-group]
                                                 [--subscription]

示例

显示配置文件版本

az automanage configuration-profile version show --profile-name {profile_name} -g {rg} -n {version_name}

可选参数

--configuration-profile-name --profile-name

配置文件名称。

--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name --version-name -n

配置文件版本名称。

--resource-group -g

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

--subscription

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

全局参数
--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 automanage configuration-profile version update

更新配置文件版本。

az automanage configuration-profile version update [--add]
                                                   [--configuration]
                                                   [--configuration-profile-name]
                                                   [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                                   [--ids]
                                                   [--name]
                                                   [--remove]
                                                   [--resource-group]
                                                   [--set]
                                                   [--subscription]
                                                   [--tags]

示例

更新配置文件版本

az automanage configuration-profile version update --profile-name {profile_name} -g {rg} -n {version_name} --configuration '{"Antimalware/Enable":true}'

可选参数

--add

通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value、string 或 JSON 字符串>。

--configuration

配置文件的配置字典。 支持 json-file 和 yaml-file。

--configuration-profile-name --profile-name

配置文件名称。

--force-string

使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name --version-name -n

配置文件版本名称。

--remove

从列表中删除属性或元素。 示例:--remove property.list OR --remove propertyToRemove。

--resource-group -g

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

--set

通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=。

--subscription

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

--tags

资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

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