Dijeli putem


az maintenance assignment

Note

This reference is part of the maintenance extension for the Azure CLI (version 2.61.0 or higher). The extension will automatically install the first time you run an az maintenance assignment command. Learn more about extensions.

Manage configuration assignment with maintenance.

Commands

Name Description Type Status
az maintenance assignment create

Apply maintenance updates to resource.

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

Apply maintenance updates to resource with parent.

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

Create configuration for resource.

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

Create configuration for resource.

Extension Experimental
az maintenance assignment delete

Delete configuration for resource.

Extension GA
az maintenance assignment delete-parent

Delete configuration for resource.

Extension GA
az maintenance assignment delete-resource-group

Delete configuration for resource.

Extension Experimental
az maintenance assignment delete-subscription

Delete configuration for resource.

Extension Experimental
az maintenance assignment list

List configurationAssignments for resource.

Extension GA
az maintenance assignment list-parent

List configurationAssignments for resource.

Extension GA
az maintenance assignment list-subscription

List configuration assignment within a subscription.

Extension Experimental
az maintenance assignment show

Get configuration assignment for resource..

Extension GA
az maintenance assignment show-parent

Get configuration assignment for resource..

Extension GA
az maintenance assignment show-resource-group

Get configuration assignment for resource..

Extension Experimental
az maintenance assignment show-subscription

Get configuration assignment for resource..

Extension Experimental
az maintenance assignment update

Update configuration for resource.

Extension GA
az maintenance assignment update-parent

Update configuration for resource.

Extension GA
az maintenance assignment update-resource-group

Update configuration for resource.

Extension Experimental
az maintenance assignment update-subscription

Update configuration for resource.

Extension Experimental

az maintenance assignment create

Apply maintenance updates to resource.

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

Examples

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"

Required Parameters

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

Configuration assignment name.

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-name

Resource identifier.

--resource-type

Resource type.

Optional Parameters

--config-id --maintenance-configuration-id

The maintenance configuration Id.

--filter-locations

List of locations to scope the query to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-os-types

List of allowed operating systems. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-groups

List of allowed resource groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-types

List of allowed resources. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags

Dictionary of tags with its list of values. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags-operator

Filter VMs by Any or All specified tags.

Accepted values: All, Any
--location -l

Location of the resource.

--resource-id

The unique resourceId.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment create-or-update-parent

Apply maintenance updates to resource with parent.

az maintenance assignment create-or-update-parent [--config-id]
                                                  [--configuration-assignment-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]

Examples

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"

Optional Parameters

--config-id --maintenance-configuration-id

The maintenance configuration Id.

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

Configuration assignment name.

--filter-locations

List of locations to scope the query to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-os-types

List of allowed operating systems. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-groups

List of allowed resource groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-types

List of allowed resources. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags

Dictionary of tags with its list of values. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags-operator

Filter VMs by Any or All specified tags.

Accepted values: All, Any
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--location -l

Location of the resource.

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-id

The unique resourceId.

--resource-name

Resource identifier.

--resource-parent-name

Resource parent identifier.

--resource-parent-type

Resource parent type.

--resource-type

Resource type.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create configuration for resource.

az maintenance assignment create-or-update-resource-group [--config-id]
                                                          [--configuration-assignment-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]

Examples

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

Optional Parameters

--config-id --maintenance-configuration-id

The maintenance configuration Id.

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

Configuration assignment name.

--filter-locations

List of locations to scope the query to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-os-types

List of allowed operating systems. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-groups

List of allowed resource groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-types

List of allowed resources. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags

Dictionary of tags with its list of values. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags-operator

Filter VMs by Any or All specified tags.

Accepted values: All, Any
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--location -l

Location of the resource.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-id

The unique resourceId.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment create-or-update-subscription

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create configuration for resource.

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

Examples

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

Optional Parameters

--config-id --maintenance-configuration-id

The maintenance configuration Id.

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

Configuration assignment name.

--filter-locations

List of locations to scope the query to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-os-types

List of allowed operating systems. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-groups

List of allowed resource groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-types

List of allowed resources. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags

Dictionary of tags with its list of values. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags-operator

Filter VMs by Any or All specified tags.

Accepted values: All, Any
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--location -l

Location of the resource.

--resource-id

The unique resourceId.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment delete

Delete configuration for resource.

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

Examples

ConfigurationAssignments_Delete

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

Optional Parameters

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

Unique configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-name

Resource identifier.

--resource-type

Resource type.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment delete-parent

Delete configuration for resource.

az maintenance assignment delete-parent [--configuration-assignment-name]
                                        [--ids]
                                        [--provider-name]
                                        [--resource-group]
                                        [--resource-name]
                                        [--resource-parent-name]
                                        [--resource-parent-type]
                                        [--resource-type]
                                        [--subscription]
                                        [--yes]

Examples

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"

Optional Parameters

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

Unique configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-name

Resource identifier.

--resource-parent-name

Resource parent identifier.

--resource-parent-type

Resource parent type.

--resource-type

Resource type.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment delete-resource-group

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete configuration for resource.

az maintenance assignment delete-resource-group [--configuration-assignment-name]
                                                [--ids]
                                                [--resource-group]
                                                [--subscription]
                                                [--yes]

Examples

ConfigurationAssignments_DeleteSubscription

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

Optional Parameters

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

Unique configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment delete-subscription

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete configuration for resource.

az maintenance assignment delete-subscription [--configuration-assignment-name]
                                              [--ids]
                                              [--subscription]
                                              [--yes]

Examples

ConfigurationAssignments_DeleteSubscription

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

Optional Parameters

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

Unique configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment list

List configurationAssignments for resource.

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

Examples

ConfigurationAssignments_List

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

Required Parameters

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-name

Resource identifier.

--resource-type

Resource type.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment list-parent

List configurationAssignments for resource.

az maintenance assignment list-parent [--ids]
                                      [--provider-name]
                                      [--resource-group]
                                      [--resource-name]
                                      [--resource-parent-name]
                                      [--resource-parent-type]
                                      [--resource-type]
                                      [--subscription]

Examples

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"

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-name

Resource identifier.

--resource-parent-name

Resource parent identifier.

--resource-parent-type

Resource parent type.

--resource-type

Resource type.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment list-subscription

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List configuration assignment within a subscription.

az maintenance assignment list-subscription

Examples

ConfigurationAssignments_List

az maintenance assignment list-subscription
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment show

Get configuration assignment for resource..

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

Examples

ConfigurationAssignments_Get

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

Optional Parameters

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

Configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-name

Resource identifier.

--resource-type

Resource type.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment show-parent

Get configuration assignment for resource..

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

Examples

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"

Optional Parameters

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

Configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-name

Resource identifier.

--resource-parent-name

Resource parent identifier.

--resource-parent-type

Resource parent type.

--resource-type

Resource type.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment show-resource-group

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get configuration assignment for resource..

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

Examples

ConfigurationAssignments_GetResourceGroup

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

Optional Parameters

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

Configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment show-subscription

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get configuration assignment for resource..

az maintenance assignment show-subscription [--configuration-assignment-name]
                                            [--ids]
                                            [--subscription]

Examples

ConfigurationAssignments_GetSubscription

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

Optional Parameters

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

Configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment update

Update configuration for resource.

az maintenance assignment update [--add]
                                 [--config-id]
                                 [--configuration-assignment-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]

Examples

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"

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--config-id --maintenance-configuration-id

The maintenance configuration Id.

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

Configuration assignment name.

--filter-locations

List of locations to scope the query to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-os-types

List of allowed operating systems. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-groups

List of allowed resource groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-types

List of allowed resources. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags

Dictionary of tags with its list of values. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags-operator

Filter VMs by Any or All specified tags.

Accepted values: All, Any
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--location -l

Location of the resource.

--provider-name

Resource provider name.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-id

The unique resourceId.

--resource-name

Resource identifier.

--resource-type

Resource type.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment update-parent

Update configuration for resource.

az maintenance assignment update-parent [--config-id]
                                        [--configuration-assignment-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]

Examples

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"

Optional Parameters

--config-id --maintenance-configuration-id

The maintenance configuration Id.

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

Configuration assignment name.

--filter-locations

List of locations to scope the query to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-os-types

List of allowed operating systems. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-groups

List of allowed resource groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-types

List of allowed resources. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags

Dictionary of tags with its list of values. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags-operator

Filter VMs by Any or All specified tags.

Accepted values: All, Any
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--location -l

Location of the resource.

--provider-name

Resource provider name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-id

The unique resourceId.

--resource-name

Resource identifier.

--resource-parent-name

Resource parent identifier.

--resource-parent-type

Resource parent type.

--resource-type

Resource type.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment update-resource-group

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update configuration for resource.

az maintenance assignment update-resource-group [--config-id]
                                                [--configuration-assignment-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]

Examples

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

Optional Parameters

--config-id --maintenance-configuration-id

The maintenance configuration Id.

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

Configuration assignment name.

--filter-locations

List of locations to scope the query to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-os-types

List of allowed operating systems. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-groups

List of allowed resource groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-types

List of allowed resources. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags

Dictionary of tags with its list of values. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags-operator

Filter VMs by Any or All specified tags.

Accepted values: All, Any
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--location -l

Location of the resource.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-id

The unique resourceId.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az maintenance assignment update-subscription

Experimental

This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update configuration for resource.

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

Examples

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

Optional Parameters

--config-id --maintenance-configuration-id

The maintenance configuration Id.

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

Configuration assignment name.

--filter-locations

List of locations to scope the query to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-os-types

List of allowed operating systems. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-groups

List of allowed resource groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-resource-types

List of allowed resources. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags

Dictionary of tags with its list of values. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--filter-tags-operator

Filter VMs by Any or All specified tags.

Accepted values: All, Any
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--location -l

Location of the resource.

--resource-id

The unique resourceId.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.