通过


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

az maintenance assignment

Note

此引用是 Azure CLI 的 maintenance 扩展的一部分(版本 2.67.0 或更高版本)。 该扩展将在首次运行 az maintenance assignment 命令时自动安装。 了解更多关于扩展的信息。

使用维护管理配置分配。

命令

名称 说明 类型 Status
az maintenance assignment create

将维护更新应用于资源。

Extension GA
az maintenance assignment create-or-update-parent

使用父级将维护更新应用到资源。

Extension GA
az maintenance assignment create-or-update-resource-group

为资源创建配置。

Extension Experimental
az maintenance assignment create-or-update-subscription

为资源创建配置。

Extension Experimental
az maintenance assignment delete

删除资源的配置。

Extension GA
az maintenance assignment delete-parent

删除资源的配置。

Extension GA
az maintenance assignment delete-resource-group

删除资源的配置。

Extension Experimental
az maintenance assignment delete-subscription

删除资源的配置。

Extension Experimental
az maintenance assignment list

列出资源的 configurationAssignments。

Extension GA
az maintenance assignment list-parent

列出资源的 configurationAssignments。

Extension GA
az maintenance assignment list-subscription

列出订阅中的配置分配。

Extension Experimental
az maintenance assignment show

获取 resource 的配置分配。

Extension GA
az maintenance assignment show-parent

获取 resource 的配置分配。

Extension GA
az maintenance assignment show-resource-group

获取 resource 的配置分配。

Extension Experimental
az maintenance assignment show-subscription

获取 resource 的配置分配。

Extension Experimental
az maintenance assignment update

更新资源的配置。

Extension GA
az maintenance assignment update-parent

更新资源的配置。

Extension GA
az maintenance assignment update-resource-group

更新资源的配置。

Extension Experimental
az maintenance assignment update-subscription

更新资源的配置。

Extension Experimental

az maintenance assignment create

将维护更新应用于资源。

az maintenance assignment create --configuration-assignment-name --name
                                 --provider-name
                                 --resource-group
                                 --resource-name
                                 --resource-type
                                 [--acquire-policy-token]
                                 [--change-reference]
                                 [--config-id --maintenance-configuration-id]
                                 [--filter-locations]
                                 [--filter-os-types]
                                 [--filter-resource-groups]
                                 [--filter-resource-types]
                                 [--filter-tags]
                                 [--filter-tags-operator {All, Any}]
                                 [--location]
                                 [--resource-id]

示例

ConfigurationAssignments_CreateOrUpdate

az maintenance assignment create --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1" --name "workervmConfiguration" --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "test1" --resource-type "virtualMachineScaleSets"

必需参数

--configuration-assignment-name --name -n

配置分配名称。

--provider-name

资源提供程序名称。

--resource-group -g

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

--resource-name

资源标识符。

--resource-type

资源类型。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--config-id --maintenance-configuration-id

维护配置 ID。

属性
参数组: Properties Arguments
--filter-locations

要限定查询范围的位置列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-os-types

允许的操作系统列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-resource-groups

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

属性
参数组: Filter Arguments
--filter-resource-types

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

属性
参数组: Filter Arguments
--filter-tags

标记及其值列表的字典。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: FilterTagSettings Arguments
--filter-tags-operator

按 Any 或 All 指定标记筛选 VM。

属性
参数组: FilterTagSettings Arguments
接受的值: All, Any
--location -l

资源的位置。

属性
参数组: ConfigurationAssignment Arguments
--resource-id

唯一 resourceId。

属性
参数组: Properties Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--subscription

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

--verbose

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

属性
默认值: False

az maintenance assignment create-or-update-parent

使用父级将维护更新应用到资源。

az maintenance assignment create-or-update-parent [--acquire-policy-token]
                                                  [--change-reference]
                                                  [--config-id --maintenance-configuration-id]
                                                  [--configuration-assignment-name --name]
                                                  [--filter-locations]
                                                  [--filter-os-types]
                                                  [--filter-resource-groups]
                                                  [--filter-resource-types]
                                                  [--filter-tags]
                                                  [--filter-tags-operator {All, Any}]
                                                  [--ids]
                                                  [--location]
                                                  [--provider-name]
                                                  [--resource-group]
                                                  [--resource-id]
                                                  [--resource-name]
                                                  [--resource-parent-name]
                                                  [--resource-parent-type]
                                                  [--resource-type]
                                                  [--subscription]

示例

ConfigurationAssignments_CreateOrUpdateParent

az maintenance assignment create-or-update-parent --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/policy1" --name "workervmPolicy" --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdvm1" --resource-parent-name "test1" --resource-parent-type "virtualMachineScaleSets" --resource-type "virtualMachines"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--config-id --maintenance-configuration-id

维护配置 ID。

属性
参数组: Properties Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--filter-locations

要限定查询范围的位置列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-os-types

允许的操作系统列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-resource-groups

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

属性
参数组: Filter Arguments
--filter-resource-types

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

属性
参数组: Filter Arguments
--filter-tags

标记及其值列表的字典。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: FilterTagSettings Arguments
--filter-tags-operator

按 Any 或 All 指定标记筛选 VM。

属性
参数组: FilterTagSettings Arguments
接受的值: All, Any
--ids

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

属性
参数组: Resource Id Arguments
--location -l

资源的位置。

属性
参数组: ConfigurationAssignment Arguments
--provider-name

资源提供程序名称。

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-id

唯一 resourceId。

属性
参数组: Properties Arguments
--resource-name

资源标识符。

属性
参数组: Resource Id Arguments
--resource-parent-name

资源父标识符。

属性
参数组: Resource Id Arguments
--resource-parent-type

资源父类型。

属性
参数组: Resource Id Arguments
--resource-type

资源类型。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment create-or-update-resource-group

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

为资源创建配置。

az maintenance assignment create-or-update-resource-group [--acquire-policy-token]
                                                          [--change-reference]
                                                          [--config-id --maintenance-configuration-id]
                                                          [--configuration-assignment-name --name]
                                                          [--filter-locations]
                                                          [--filter-os-types]
                                                          [--filter-resource-groups]
                                                          [--filter-resource-types]
                                                          [--filter-tags]
                                                          [--filter-tags-operator {All, Any}]
                                                          [--ids]
                                                          [--location]
                                                          [--resource-group]
                                                          [--resource-id]
                                                          [--subscription]

示例

ConfigurationAssignments_CreateOrUpdateResourceGroup

az maintenance assignment create-or-update-resource-group  --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1"  --name assignmentname  --filter-locations eastus2euap centraluseuap  --filter-os-types windows linux  --filter-tags "{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}"  --filter-tags-operator All  --resource-group examplerg1

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--config-id --maintenance-configuration-id

维护配置 ID。

属性
参数组: Properties Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--filter-locations

要限定查询范围的位置列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-os-types

允许的操作系统列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-resource-groups

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

属性
参数组: Filter Arguments
--filter-resource-types

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

属性
参数组: Filter Arguments
--filter-tags

标记及其值列表的字典。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: FilterTagSettings Arguments
--filter-tags-operator

按 Any 或 All 指定标记筛选 VM。

属性
参数组: FilterTagSettings Arguments
接受的值: All, Any
--ids

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

属性
参数组: Resource Id Arguments
--location -l

资源的位置。

属性
参数组: ConfigurationAssignment Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-id

唯一 resourceId。

属性
参数组: Properties Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment create-or-update-subscription

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

为资源创建配置。

az maintenance assignment create-or-update-subscription [--acquire-policy-token]
                                                        [--change-reference]
                                                        [--config-id --maintenance-configuration-id]
                                                        [--configuration-assignment-name --name]
                                                        [--filter-locations]
                                                        [--filter-os-types]
                                                        [--filter-resource-groups]
                                                        [--filter-resource-types]
                                                        [--filter-tags]
                                                        [--filter-tags-operator {All, Any}]
                                                        [--ids]
                                                        [--location]
                                                        [--resource-id]
                                                        [--subscription]

示例

ConfigurationAssignments_CreateOrUpdateSubscription

az maintenance assignment create-or-update-subscription  --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1"  --name assignmentname  --filter-locations eastus2euap centraluseuap  --filter-os-types windows linux  --filter-tags "{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}"  --filter-tags-operator All

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--config-id --maintenance-configuration-id

维护配置 ID。

属性
参数组: Properties Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--filter-locations

要限定查询范围的位置列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-os-types

允许的操作系统列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-resource-groups

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

属性
参数组: Filter Arguments
--filter-resource-types

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

属性
参数组: Filter Arguments
--filter-tags

标记及其值列表的字典。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: FilterTagSettings Arguments
--filter-tags-operator

按 Any 或 All 指定标记筛选 VM。

属性
参数组: FilterTagSettings Arguments
接受的值: All, Any
--ids

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

属性
参数组: Resource Id Arguments
--location -l

资源的位置。

属性
参数组: ConfigurationAssignment Arguments
--resource-id

唯一 resourceId。

属性
参数组: Properties Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment delete

删除资源的配置。

az maintenance assignment delete [--acquire-policy-token]
                                 [--change-reference]
                                 [--configuration-assignment-name --name]
                                 [--ids]
                                 [--provider-name]
                                 [--resource-group]
                                 [--resource-name]
                                 [--resource-type]
                                 [--subscription]
                                 [--yes]

示例

ConfigurationAssignments_Delete

az maintenance assignment delete --name "workervmConfiguration" --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdtest1" --resource-type "virtualMachineScaleSets"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--configuration-assignment-name --name -n

唯一的配置分配名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--provider-name

资源提供程序名称。

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-name

资源标识符。

属性
参数组: Resource Id Arguments
--resource-type

资源类型。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
--yes -y

不要提示确认。

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

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment delete-parent

删除资源的配置。

az maintenance assignment delete-parent [--acquire-policy-token]
                                        [--change-reference]
                                        [--configuration-assignment-name --name]
                                        [--ids]
                                        [--provider-name]
                                        [--resource-group]
                                        [--resource-name]
                                        [--resource-parent-name]
                                        [--resource-parent-type]
                                        [--resource-type]
                                        [--subscription]
                                        [--yes]

示例

ConfigurationAssignments_DeleteParent

az maintenance assignment delete-parent --name "workervmConfiguration" --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdvm1" --resource-parent-name "smdtest1" --resource-parent-type "virtualMachineScaleSets" --resource-type "virtualMachines"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--configuration-assignment-name --name -n

唯一的配置分配名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--provider-name

资源提供程序名称。

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-name

资源标识符。

属性
参数组: Resource Id Arguments
--resource-parent-name

资源父标识符。

属性
参数组: Resource Id Arguments
--resource-parent-type

资源父类型。

属性
参数组: Resource Id Arguments
--resource-type

资源类型。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
--yes -y

不要提示确认。

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

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment delete-resource-group

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

删除资源的配置。

az maintenance assignment delete-resource-group [--acquire-policy-token]
                                                [--change-reference]
                                                [--configuration-assignment-name --name]
                                                [--ids]
                                                [--resource-group]
                                                [--subscription]
                                                [--yes]

示例

ConfigurationAssignments_DeleteSubscription

az maintenance assignment delete-resource-group --resource-group "examplerg" --name "example1"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--configuration-assignment-name --name -n

唯一的配置分配名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
--yes -y

不要提示确认。

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

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment delete-subscription

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

删除资源的配置。

az maintenance assignment delete-subscription [--acquire-policy-token]
                                              [--change-reference]
                                              [--configuration-assignment-name --name]
                                              [--ids]
                                              [--subscription]
                                              [--yes]

示例

ConfigurationAssignments_DeleteSubscription

az maintenance assignment delete-subscription --name "example1"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--configuration-assignment-name --name -n

唯一的配置分配名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
--yes -y

不要提示确认。

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

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment list

列出资源的 configurationAssignments。

az maintenance assignment list --provider-name
                               --resource-group
                               --resource-name
                               --resource-type

示例

ConfigurationAssignments_List

az maintenance assignment list --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdtest1" --resource-type "virtualMachineScaleSets"

必需参数

--provider-name

资源提供程序名称。

--resource-group -g

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

--resource-name

资源标识符。

--resource-type

资源类型。

全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--subscription

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

--verbose

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

属性
默认值: False

az maintenance assignment list-parent

列出资源的 configurationAssignments。

az maintenance assignment list-parent [--acquire-policy-token]
                                      [--change-reference]
                                      [--ids]
                                      [--provider-name]
                                      [--resource-group]
                                      [--resource-name]
                                      [--resource-parent-name]
                                      [--resource-parent-type]
                                      [--resource-type]
                                      [--subscription]

示例

ConfigurationAssignments_ListParent

az maintenance assignment list-parent --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdtestvm1" --resource-parent-name "smdtest1" --resource-parent-type "virtualMachineScaleSets" --resource-type "virtualMachines"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--ids

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

属性
参数组: Resource Id Arguments
--provider-name

资源提供程序名称。

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-name

资源标识符。

属性
参数组: Resource Id Arguments
--resource-parent-name

资源父标识符。

属性
参数组: Resource Id Arguments
--resource-parent-type

资源父类型。

属性
参数组: Resource Id Arguments
--resource-type

资源类型。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment list-subscription

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

列出订阅中的配置分配。

az maintenance assignment list-subscription [--acquire-policy-token]
                                            [--change-reference]

示例

ConfigurationAssignments_List

az maintenance assignment list-subscription

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--subscription

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

--verbose

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

属性
默认值: False

az maintenance assignment show

获取 resource 的配置分配。

az maintenance assignment show [--configuration-assignment-name --name]
                               [--ids]
                               [--provider-name]
                               [--resource-group]
                               [--resource-name]
                               [--resource-type]
                               [--subscription]

示例

ConfigurationAssignments_Get

az maintenance assignment show --name "workervmConfiguration" --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdtest1" --resource-type "virtualMachineScaleSets"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--provider-name

资源提供程序名称。

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-name

资源标识符。

属性
参数组: Resource Id Arguments
--resource-type

资源类型。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment show-parent

获取 resource 的配置分配。

az maintenance assignment show-parent [--acquire-policy-token]
                                      [--change-reference]
                                      [--configuration-assignment-name --name]
                                      [--ids]
                                      [--provider-name]
                                      [--resource-group]
                                      [--resource-name]
                                      [--resource-parent-name]
                                      [--resource-parent-type]
                                      [--resource-type]
                                      [--subscription]

示例

ConfigurationAssignments_GetParent

az maintenance assignment show-parent --name "workervmPolicy" --provider-name  "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdvm1" --resource-parent- name "smdtest1" --resource-parent-type "virtualMachineScaleSets" --resource-type "virtualMachines"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--provider-name

资源提供程序名称。

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-name

资源标识符。

属性
参数组: Resource Id Arguments
--resource-parent-name

资源父标识符。

属性
参数组: Resource Id Arguments
--resource-parent-type

资源父类型。

属性
参数组: Resource Id Arguments
--resource-type

资源类型。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment show-resource-group

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

获取 resource 的配置分配。

az maintenance assignment show-resource-group [--acquire-policy-token]
                                              [--change-reference]
                                              [--configuration-assignment-name --name]
                                              [--ids]
                                              [--resource-group]
                                              [--subscription]

示例

ConfigurationAssignments_GetResourceGroup

az maintenance assignment show-subscription --resource-group "examplerg" --name "example1"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment show-subscription

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

获取 resource 的配置分配。

az maintenance assignment show-subscription [--acquire-policy-token]
                                            [--change-reference]
                                            [--configuration-assignment-name --name]
                                            [--ids]
                                            [--subscription]

示例

ConfigurationAssignments_GetSubscription

az maintenance assignment show-subscription --name "example1"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment update

更新资源的配置。

az maintenance assignment update [--acquire-policy-token]
                                 [--add]
                                 [--change-reference]
                                 [--config-id --maintenance-configuration-id]
                                 [--configuration-assignment-name --name]
                                 [--filter-locations]
                                 [--filter-os-types]
                                 [--filter-resource-groups]
                                 [--filter-resource-types]
                                 [--filter-tags]
                                 [--filter-tags-operator {All, Any}]
                                 [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                 [--ids]
                                 [--location]
                                 [--provider-name]
                                 [--remove]
                                 [--resource-group]
                                 [--resource-id]
                                 [--resource-name]
                                 [--resource-type]
                                 [--set]
                                 [--subscription]

示例

ConfigurationAssignments_Update

az maintenance assignment update --maintenance-configuration-id "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1" --name "workervmConfiguration" --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdtest1" --resource-type "virtualMachineScaleSets"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--add

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

属性
参数组: Generic Update Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--config-id --maintenance-configuration-id

维护配置 ID。

属性
参数组: Properties Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--filter-locations

要限定查询范围的位置列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-os-types

允许的操作系统列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-resource-groups

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

属性
参数组: Filter Arguments
--filter-resource-types

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

属性
参数组: Filter Arguments
--filter-tags

标记及其值列表的字典。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: FilterTagSettings Arguments
--filter-tags-operator

按 Any 或 All 指定标记筛选 VM。

属性
参数组: FilterTagSettings Arguments
接受的值: All, Any
--force-string

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

属性
参数组: Generic Update Arguments
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--ids

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

属性
参数组: Resource Id Arguments
--location -l

资源的位置。

属性
参数组: ConfigurationAssignment Arguments
--provider-name

资源提供程序名称。

属性
参数组: Resource Id Arguments
--remove

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

属性
参数组: Generic Update Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-id

唯一 resourceId。

属性
参数组: Properties Arguments
--resource-name

资源标识符。

属性
参数组: Resource Id Arguments
--resource-type

资源类型。

属性
参数组: Resource Id Arguments
--set

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

属性
参数组: Generic Update Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment update-parent

更新资源的配置。

az maintenance assignment update-parent [--acquire-policy-token]
                                        [--change-reference]
                                        [--config-id --maintenance-configuration-id]
                                        [--configuration-assignment-name --name]
                                        [--filter-locations]
                                        [--filter-os-types]
                                        [--filter-resource-groups]
                                        [--filter-resource-types]
                                        [--filter-tags]
                                        [--filter-tags-operator {All, Any}]
                                        [--ids]
                                        [--location]
                                        [--provider-name]
                                        [--resource-group]
                                        [--resource-id]
                                        [--resource-name]
                                        [--resource-parent-name]
                                        [--resource-parent-type]
                                        [--resource-type]
                                        [--subscription]

示例

ConfigurationAssignments_UpdateParent

az maintenance assignment update-parent --maintenance-configuration-id "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/policy1" --name "workervmPolicy" --provider-name "Microsoft.Compute" --resource-group "examplerg" --resource-name "smdvm1" --resource-parent-name "smdtest1" --resource-parent-type "virtualMachineScaleSets" --resource-type "virtualMachines"

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--config-id --maintenance-configuration-id

维护配置 ID。

属性
参数组: Properties Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--filter-locations

要限定查询范围的位置列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-os-types

允许的操作系统列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-resource-groups

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

属性
参数组: Filter Arguments
--filter-resource-types

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

属性
参数组: Filter Arguments
--filter-tags

标记及其值列表的字典。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: FilterTagSettings Arguments
--filter-tags-operator

按 Any 或 All 指定标记筛选 VM。

属性
参数组: FilterTagSettings Arguments
接受的值: All, Any
--ids

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

属性
参数组: Resource Id Arguments
--location -l

资源的位置。

属性
参数组: ConfigurationAssignment Arguments
--provider-name

资源提供程序名称。

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-id

唯一 resourceId。

属性
参数组: Properties Arguments
--resource-name

资源标识符。

属性
参数组: Resource Id Arguments
--resource-parent-name

资源父标识符。

属性
参数组: Resource Id Arguments
--resource-parent-type

资源父类型。

属性
参数组: Resource Id Arguments
--resource-type

资源类型。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment update-resource-group

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

更新资源的配置。

az maintenance assignment update-resource-group [--acquire-policy-token]
                                                [--change-reference]
                                                [--config-id --maintenance-configuration-id]
                                                [--configuration-assignment-name --name]
                                                [--filter-locations]
                                                [--filter-os-types]
                                                [--filter-resource-groups]
                                                [--filter-resource-types]
                                                [--filter-tags]
                                                [--filter-tags-operator {All, Any}]
                                                [--ids]
                                                [--location]
                                                [--resource-group]
                                                [--resource-id]
                                                [--subscription]

示例

ConfigurationAssignments_UpdateResourceGroup

az maintenance assignment create-or-update-resource-group --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}" --filter-tags-operator All --resource-group examplerg1

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--config-id --maintenance-configuration-id

维护配置 ID。

属性
参数组: Properties Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--filter-locations

要限定查询范围的位置列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-os-types

允许的操作系统列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-resource-groups

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

属性
参数组: Filter Arguments
--filter-resource-types

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

属性
参数组: Filter Arguments
--filter-tags

标记及其值列表的字典。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: FilterTagSettings Arguments
--filter-tags-operator

按 Any 或 All 指定标记筛选 VM。

属性
参数组: FilterTagSettings Arguments
接受的值: All, Any
--ids

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

属性
参数组: Resource Id Arguments
--location -l

资源的位置。

属性
参数组: ConfigurationAssignment Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--resource-id

唯一 resourceId。

属性
参数组: Properties Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az maintenance assignment update-subscription

实验

此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

更新资源的配置。

az maintenance assignment update-subscription [--acquire-policy-token]
                                              [--change-reference]
                                              [--config-id --maintenance-configuration-id]
                                              [--configuration-assignment-name --name]
                                              [--filter-locations]
                                              [--filter-os-types]
                                              [--filter-resource-groups]
                                              [--filter-resource-types]
                                              [--filter-tags]
                                              [--filter-tags-operator {All, Any}]
                                              [--ids]
                                              [--location]
                                              [--resource-id]
                                              [--subscription]

示例

ConfigurationAssignments_UpdateSubscription

az maintenance assignment update-subscription  --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1"  --name assignmentname  --filter-locations eastus2euap centraluseuap  --filter-os-types windows linux  --filter-tags "{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}"  --filter-tags-operator All

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性
参数组: Global Policy Arguments
--config-id --maintenance-configuration-id

维护配置 ID。

属性
参数组: Properties Arguments
--configuration-assignment-name --name -n

配置分配名称。

属性
参数组: Resource Id Arguments
--filter-locations

要限定查询范围的位置列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-os-types

允许的操作系统列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: Filter Arguments
--filter-resource-groups

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

属性
参数组: Filter Arguments
--filter-resource-types

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

属性
参数组: Filter Arguments
--filter-tags

标记及其值列表的字典。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性
参数组: FilterTagSettings Arguments
--filter-tags-operator

按 Any 或 All 指定标记筛选 VM。

属性
参数组: FilterTagSettings Arguments
接受的值: All, Any
--ids

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

属性
参数组: Resource Id Arguments
--location -l

资源的位置。

属性
参数组: ConfigurationAssignment Arguments
--resource-id

唯一 resourceId。

属性
参数组: Properties Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False