Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The maintenanceConfigurations resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Usage Examples
Bicep Samples
A basic example of deploying Maintenance Configuration.
param location string = 'westeurope'
param resourceName string = 'acctest0001'
resource maintenanceConfiguration 'Microsoft.Maintenance/maintenanceConfigurations@2022-07-01-preview' = {
name: resourceName
location: location
properties: {
extensionProperties: {}
maintenanceScope: 'SQLDB'
namespace: 'Microsoft.Maintenance'
visibility: 'Custom'
}
}
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
| Module | Description |
|---|---|
| Maintenance Configuration | AVM Resource Module for Maintenance Configuration |
Resource format
To create a Microsoft.Maintenance/maintenanceConfigurations resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Maintenance/maintenanceConfigurations@2021-05-01' = {
location: 'string'
name: 'string'
properties: {
extensionProperties: {
{customized property}: 'string'
}
maintenanceScope: 'string'
maintenanceWindow: {
duration: 'string'
expirationDateTime: 'string'
recurEvery: 'string'
startDateTime: 'string'
timeZone: 'string'
}
namespace: 'string'
visibility: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Maintenance/maintenanceConfigurations
| Name | Description | Value |
|---|---|---|
| location | Gets or sets location of the resource | string |
| name | The resource name | string (required) |
| properties | Gets or sets properties of the resource | MaintenanceConfigurationProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
MaintenanceConfigurationProperties
| Name | Description | Value |
|---|---|---|
| extensionProperties | Gets or sets extensionProperties of the maintenanceConfiguration | MaintenanceConfigurationPropertiesExtensionProperties |
| maintenanceScope | Gets or sets maintenanceScope of the configuration | 'Extension' 'Host' 'InGuestPatch' 'OSImage' 'SQLDB' 'SQLManagedInstance' |
| maintenanceWindow | Definition of a MaintenanceWindow | MaintenanceWindow |
| namespace | Gets or sets namespace of the resource | string |
| visibility | Gets or sets the visibility of the configuration. The default value is 'Custom' | 'Custom' 'Public' |
MaintenanceConfigurationPropertiesExtensionProperties
| Name | Description | Value |
|---|
MaintenanceConfigurationTags
| Name | Description | Value |
|---|
MaintenanceWindow
| Name | Description | Value |
|---|---|---|
| duration | 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. | string |
| expirationDateTime | 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. | string |
| recurEvery | 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]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday. | string |
| startDateTime | 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. | string |
| timeZone | 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. | string |
ARM template resource definition
The maintenanceConfigurations resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands For a list of changed properties in each API version, see change log.
Usage Examples
Resource format
To create a Microsoft.Maintenance/maintenanceConfigurations resource, add the following JSON to your template.
{
"type": "Microsoft.Maintenance/maintenanceConfigurations",
"apiVersion": "2021-05-01",
"name": "string",
"location": "string",
"properties": {
"extensionProperties": {
"{customized property}": "string"
},
"maintenanceScope": "string",
"maintenanceWindow": {
"duration": "string",
"expirationDateTime": "string",
"recurEvery": "string",
"startDateTime": "string",
"timeZone": "string"
},
"namespace": "string",
"visibility": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Maintenance/maintenanceConfigurations
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2021-05-01' |
| location | Gets or sets location of the resource | string |
| name | The resource name | string (required) |
| properties | Gets or sets properties of the resource | MaintenanceConfigurationProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.Maintenance/maintenanceConfigurations' |
MaintenanceConfigurationProperties
| Name | Description | Value |
|---|---|---|
| extensionProperties | Gets or sets extensionProperties of the maintenanceConfiguration | MaintenanceConfigurationPropertiesExtensionProperties |
| maintenanceScope | Gets or sets maintenanceScope of the configuration | 'Extension' 'Host' 'InGuestPatch' 'OSImage' 'SQLDB' 'SQLManagedInstance' |
| maintenanceWindow | Definition of a MaintenanceWindow | MaintenanceWindow |
| namespace | Gets or sets namespace of the resource | string |
| visibility | Gets or sets the visibility of the configuration. The default value is 'Custom' | 'Custom' 'Public' |
MaintenanceConfigurationPropertiesExtensionProperties
| Name | Description | Value |
|---|
MaintenanceConfigurationTags
| Name | Description | Value |
|---|
MaintenanceWindow
| Name | Description | Value |
|---|---|---|
| duration | 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. | string |
| expirationDateTime | 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. | string |
| recurEvery | 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]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday. | string |
| startDateTime | 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. | string |
| timeZone | 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. | string |
Terraform (AzAPI provider) resource definition
The maintenanceConfigurations resource type can be deployed with operations that target:
- Resource groups For a list of changed properties in each API version, see change log.
Usage Examples
Terraform Samples
A basic example of deploying Maintenance Configuration.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "maintenanceConfiguration" {
type = "Microsoft.Maintenance/maintenanceConfigurations@2022-07-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
extensionProperties = {
}
maintenanceScope = "SQLDB"
namespace = "Microsoft.Maintenance"
visibility = "Custom"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
| Module | Description |
|---|---|
| Maintenance Configuration | AVM Resource Module for Maintenance Configuration |
Resource format
To create a Microsoft.Maintenance/maintenanceConfigurations resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Maintenance/maintenanceConfigurations@2021-05-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
extensionProperties = {
{customized property} = "string"
}
maintenanceScope = "string"
maintenanceWindow = {
duration = "string"
expirationDateTime = "string"
recurEvery = "string"
startDateTime = "string"
timeZone = "string"
}
namespace = "string"
visibility = "string"
}
}
}
Property Values
Microsoft.Maintenance/maintenanceConfigurations
| Name | Description | Value |
|---|---|---|
| location | Gets or sets location of the resource | string |
| name | The resource name | string (required) |
| properties | Gets or sets properties of the resource | MaintenanceConfigurationProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.Maintenance/maintenanceConfigurations@2021-05-01" |
MaintenanceConfigurationProperties
| Name | Description | Value |
|---|---|---|
| extensionProperties | Gets or sets extensionProperties of the maintenanceConfiguration | MaintenanceConfigurationPropertiesExtensionProperties |
| maintenanceScope | Gets or sets maintenanceScope of the configuration | 'Extension' 'Host' 'InGuestPatch' 'OSImage' 'SQLDB' 'SQLManagedInstance' |
| maintenanceWindow | Definition of a MaintenanceWindow | MaintenanceWindow |
| namespace | Gets or sets namespace of the resource | string |
| visibility | Gets or sets the visibility of the configuration. The default value is 'Custom' | 'Custom' 'Public' |
MaintenanceConfigurationPropertiesExtensionProperties
| Name | Description | Value |
|---|
MaintenanceConfigurationTags
| Name | Description | Value |
|---|
MaintenanceWindow
| Name | Description | Value |
|---|---|---|
| duration | 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. | string |
| expirationDateTime | 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. | string |
| recurEvery | 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]. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday. | string |
| startDateTime | 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. | string |
| timeZone | 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. | string |