az maintenance configuration
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 configuration command. Learn more about extensions.
Manage maintenance configuration with maintenance.
Commands
Name | Description | Type | Status |
---|---|---|---|
az maintenance configuration create |
Create configuration record. |
Extension | GA |
az maintenance configuration delete |
Delete Configuration record. |
Extension | GA |
az maintenance configuration list |
List Configuration records within a subscription and resource group. |
Extension | GA |
az maintenance configuration show |
Get Configuration record. |
Extension | GA |
az maintenance configuration update |
Update configuration record. |
Extension | GA |
az maintenance configuration create
Create configuration record.
az maintenance configuration create --name
--resource-group
[--duration]
[--expiration-date-time]
[--extension-properties]
[--install-patches-linux-parameters]
[--install-patches-windows-parameters]
[--location]
[--maintenance-scope {Extension, Host, InGuestPatch, OSImage, Resource, SQLDB, SQLManagedInstance}]
[--maintenance-window-recur-every]
[--maintenance-window-start-date-time]
[--maintenance-window-time-zone]
[--namespace]
[--reboot-setting {Always, IfRequired, Never}]
[--tags]
[--visibility {Custom, Public}]
Examples
MaintenanceConfigurations_CreateOrUpdateForResource
az maintenance configuration create --location "westus2" --maintenance-scope "OSImage" --maintenance-window-duration "05:00" --maintenance-window-expiration-date-time "9999-12-31 00:00" --maintenance-window-recur-every "Day" --maintenance-window-start-date-time "2020-04-30 08:00" --maintenance-window-time-zone "Pacific Standard Time" --namespace "Microsoft.Maintenance" --visibility "Custom" --resource-group "examplerg" --resource-name "configuration1"
Required Parameters
Maintenance Configuration Name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.
Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.
Gets or sets extensionProperties of the maintenanceConfiguration Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Input parameters specific to patching Linux machine. For Windows machines, do not pass this property. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Input parameters specific to patching a Windows machine. For Linux machines, do not pass this property. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Gets or sets location of the resource.
Gets or sets maintenanceScope of the configuration.
Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday] [Optional Offset(No. of days)]. Offset value must be between -6 to 6 inclusive. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday, recurEvery: Month Last Sunday Offset-3, recurEvery: Month Third Sunday Offset6.
Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.
Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.
Gets or sets namespace of the resource.
Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed.
Gets or sets tags of the resource Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Gets or sets the visibility of the configuration. The default value is 'Custom'.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az maintenance configuration delete
Delete Configuration record.
az maintenance configuration delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Examples
MaintenanceConfigurations_DeleteForResource
az maintenance configuration delete --resource-group "examplerg" --resource-name "example1"
Optional Parameters
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.
Maintenance Configuration Name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az maintenance configuration list
List Configuration records within a subscription and resource group.
az maintenance configuration list [--resource-group]
Examples
MaintenanceConfigurations_List
az maintenance configuration list
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az maintenance configuration show
Get Configuration record.
az maintenance configuration show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
MaintenanceConfigurations_GetForResource
az maintenance configuration show --resource-group "examplerg" --resource-name "configuration1"
Optional Parameters
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.
Maintenance Configuration Name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az maintenance configuration update
Update configuration record.
az maintenance configuration update [--duration]
[--expiration-date-time]
[--extension-properties]
[--ids]
[--install-patches-linux-parameters]
[--install-patches-windows-parameters]
[--location]
[--maintenance-scope {Extension, Host, InGuestPatch, OSImage, Resource, SQLDB, SQLManagedInstance}]
[--maintenance-window-recur-every]
[--maintenance-window-start-date-time]
[--maintenance-window-time-zone]
[--name]
[--namespace]
[--reboot-setting {Always, IfRequired, Never}]
[--resource-group]
[--subscription]
[--tags]
[--visibility {Custom, Public}]
Examples
MaintenanceConfigurations_UpdateForResource
az maintenance configuration update --location "westus2" --maintenance-scope "OSImage" --maintenance-window-duration "05:00" --maintenance-window-expiration-date-time "9999-12-31 00:00" --maintenance-window-recur-every "Month Third Sunday" --maintenance-window-start-date-time "2020-04-30 08:00" --maintenance-window-time-zone "Pacific Standard Time" --namespace "Microsoft.Maintenance" --visibility "Custom" --resource-group "examplerg" --resource-name "configuration1"
Optional Parameters
Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00.
Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59.
Gets or sets extensionProperties of the maintenanceConfiguration Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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.
Input parameters specific to patching Linux machine. For Windows machines, do not pass this property. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Input parameters specific to patching a Windows machine. For Linux machines, do not pass this property. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Gets or sets location of the resource.
Gets or sets maintenanceScope of the configuration.
Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday] [Optional Offset(No. of days)]. Offset value must be between -6 to 6 inclusive. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday, recurEvery: Month Last Sunday Offset-3, recurEvery: Month Third Sunday Offset6.
Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone.
Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time.
Maintenance Configuration Name.
Gets or sets namespace of the resource.
Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Gets or sets tags of the resource Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Gets or sets the visibility of the configuration. The default value is 'Custom'.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.