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 maintenanceWindows 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.
Resource format
To create a Microsoft.ContainerService/maintenanceWindows resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.ContainerService/maintenanceWindows@2026-04-02-preview' = {
location: 'string'
name: 'string'
properties: {
durationHours: int
notAllowedDates: [
{
end: 'string'
start: 'string'
}
]
schedule: {
absoluteMonthly: {
dayOfMonth: int
intervalMonths: int
}
daily: {
intervalDays: int
}
relativeMonthly: {
dayOfWeek: 'string'
intervalMonths: int
weekIndex: 'string'
}
weekly: {
dayOfWeek: 'string'
intervalWeeks: int
}
}
startDate: 'string'
startTime: 'string'
utcOffset: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.ContainerService/maintenanceWindows
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (required) |
| properties | Properties of a maintenance window. | MaintenanceWindowResourceProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
AbsoluteMonthlySchedule
| Name | Description | Value |
|---|---|---|
| dayOfMonth | The date of the month. | int Constraints: Min value = 1 Max value = 31 (required) |
| intervalMonths | Specifies the number of months between each set of occurrences. | int Constraints: Min value = 1 Max value = 6 (required) |
DailySchedule
| Name | Description | Value |
|---|---|---|
| intervalDays | Specifies the number of days between each set of occurrences. | int Constraints: Min value = 1 Max value = 7 (required) |
DateSpan
| Name | Description | Value |
|---|---|---|
| end | The end date of the date span. | string (required) |
| start | The start date of the date span. | string (required) |
MaintenanceWindowResourceProperties
| Name | Description | Value |
|---|---|---|
| durationHours | Length of the maintenance window in hours. | int Constraints: Min value = 4 Max value = 24 (required) |
| notAllowedDates | Date ranges during which maintenance is not allowed. 'utcOffset' applies to these dates. For example, with 'utcOffset: +02:00' and a date span of '2026-12-23' to '2027-01-03', maintenance will be blocked from '2026-12-22 22:00' to '2027-01-03 22:00' in UTC time. |
DateSpan[] |
| schedule | Recurrence schedule for the maintenance window. One and only one of the schedule types should be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. |
Schedule (required) |
| startDate | The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used. If not specified, the maintenance window will be active right away. |
string |
| startTime | The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. |
string Constraints: Pattern = ^([01]\d|2[0-3]):[0-5]\d$ (required) |
| utcOffset | The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'. Note: this is a static offset and does not adjust for Daylight Saving Time. Customers in DST-observing regions should pick the offset that matches their preferred wall-clock time year-round; the maintenance window will shift by one hour relative to local time when DST starts or ends. |
string Constraints: Pattern = ^[+-](0\d|1[0-4]):(00|15|30|45)$ |
RelativeMonthlySchedule
| Name | Description | Value |
|---|---|---|
| dayOfWeek | Specifies on which day of the week the maintenance occurs. | 'Friday' 'Monday' 'Saturday' 'Sunday' 'Thursday' 'Tuesday' 'Wednesday' (required) |
| intervalMonths | Specifies the number of months between each set of occurrences. | int Constraints: Min value = 1 Max value = 6 (required) |
| weekIndex | The week index. Specifies on which week of the month the dayOfWeek applies. | 'First' 'Fourth' 'Last' 'Second' 'Third' (required) |
Schedule
| Name | Description | Value |
|---|---|---|
| absoluteMonthly | For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. | AbsoluteMonthlySchedule |
| daily | For schedules like: 'recur every day' or 'recur every 3 days'. | DailySchedule |
| relativeMonthly | For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. | RelativeMonthlySchedule |
| weekly | For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. | WeeklySchedule |
TrackedResourceTags
| Name | Description | Value |
|---|
WeeklySchedule
| Name | Description | Value |
|---|---|---|
| dayOfWeek | Specifies on which day of the week the maintenance occurs. | 'Friday' 'Monday' 'Saturday' 'Sunday' 'Thursday' 'Tuesday' 'Wednesday' (required) |
| intervalWeeks | Specifies the number of weeks between each set of occurrences. | int Constraints: Min value = 1 Max value = 4 (required) |
ARM template resource definition
The maintenanceWindows 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.ContainerService/maintenanceWindows resource, add the following JSON to your template.
{
"type": "Microsoft.ContainerService/maintenanceWindows",
"apiVersion": "2026-04-02-preview",
"name": "string",
"location": "string",
"properties": {
"durationHours": "int",
"notAllowedDates": [
{
"end": "string",
"start": "string"
}
],
"schedule": {
"absoluteMonthly": {
"dayOfMonth": "int",
"intervalMonths": "int"
},
"daily": {
"intervalDays": "int"
},
"relativeMonthly": {
"dayOfWeek": "string",
"intervalMonths": "int",
"weekIndex": "string"
},
"weekly": {
"dayOfWeek": "string",
"intervalWeeks": "int"
}
},
"startDate": "string",
"startTime": "string",
"utcOffset": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.ContainerService/maintenanceWindows
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2026-04-02-preview' |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (required) |
| properties | Properties of a maintenance window. | MaintenanceWindowResourceProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.ContainerService/maintenanceWindows' |
AbsoluteMonthlySchedule
| Name | Description | Value |
|---|---|---|
| dayOfMonth | The date of the month. | int Constraints: Min value = 1 Max value = 31 (required) |
| intervalMonths | Specifies the number of months between each set of occurrences. | int Constraints: Min value = 1 Max value = 6 (required) |
DailySchedule
| Name | Description | Value |
|---|---|---|
| intervalDays | Specifies the number of days between each set of occurrences. | int Constraints: Min value = 1 Max value = 7 (required) |
DateSpan
| Name | Description | Value |
|---|---|---|
| end | The end date of the date span. | string (required) |
| start | The start date of the date span. | string (required) |
MaintenanceWindowResourceProperties
| Name | Description | Value |
|---|---|---|
| durationHours | Length of the maintenance window in hours. | int Constraints: Min value = 4 Max value = 24 (required) |
| notAllowedDates | Date ranges during which maintenance is not allowed. 'utcOffset' applies to these dates. For example, with 'utcOffset: +02:00' and a date span of '2026-12-23' to '2027-01-03', maintenance will be blocked from '2026-12-22 22:00' to '2027-01-03 22:00' in UTC time. |
DateSpan[] |
| schedule | Recurrence schedule for the maintenance window. One and only one of the schedule types should be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. |
Schedule (required) |
| startDate | The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used. If not specified, the maintenance window will be active right away. |
string |
| startTime | The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. |
string Constraints: Pattern = ^([01]\d|2[0-3]):[0-5]\d$ (required) |
| utcOffset | The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'. Note: this is a static offset and does not adjust for Daylight Saving Time. Customers in DST-observing regions should pick the offset that matches their preferred wall-clock time year-round; the maintenance window will shift by one hour relative to local time when DST starts or ends. |
string Constraints: Pattern = ^[+-](0\d|1[0-4]):(00|15|30|45)$ |
RelativeMonthlySchedule
| Name | Description | Value |
|---|---|---|
| dayOfWeek | Specifies on which day of the week the maintenance occurs. | 'Friday' 'Monday' 'Saturday' 'Sunday' 'Thursday' 'Tuesday' 'Wednesday' (required) |
| intervalMonths | Specifies the number of months between each set of occurrences. | int Constraints: Min value = 1 Max value = 6 (required) |
| weekIndex | The week index. Specifies on which week of the month the dayOfWeek applies. | 'First' 'Fourth' 'Last' 'Second' 'Third' (required) |
Schedule
| Name | Description | Value |
|---|---|---|
| absoluteMonthly | For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. | AbsoluteMonthlySchedule |
| daily | For schedules like: 'recur every day' or 'recur every 3 days'. | DailySchedule |
| relativeMonthly | For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. | RelativeMonthlySchedule |
| weekly | For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. | WeeklySchedule |
TrackedResourceTags
| Name | Description | Value |
|---|
WeeklySchedule
| Name | Description | Value |
|---|---|---|
| dayOfWeek | Specifies on which day of the week the maintenance occurs. | 'Friday' 'Monday' 'Saturday' 'Sunday' 'Thursday' 'Tuesday' 'Wednesday' (required) |
| intervalWeeks | Specifies the number of weeks between each set of occurrences. | int Constraints: Min value = 1 Max value = 4 (required) |
Terraform (AzAPI provider) resource definition
The maintenanceWindows resource type can be deployed with operations that target:
- Resource groups For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.ContainerService/maintenanceWindows resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.ContainerService/maintenanceWindows@2026-04-02-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
durationHours = int
notAllowedDates = [
{
end = "string"
start = "string"
}
]
schedule = {
absoluteMonthly = {
dayOfMonth = int
intervalMonths = int
}
daily = {
intervalDays = int
}
relativeMonthly = {
dayOfWeek = "string"
intervalMonths = int
weekIndex = "string"
}
weekly = {
dayOfWeek = "string"
intervalWeeks = int
}
}
startDate = "string"
startTime = "string"
utcOffset = "string"
}
}
}
Property Values
Microsoft.ContainerService/maintenanceWindows
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (required) |
| properties | Properties of a maintenance window. | MaintenanceWindowResourceProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.ContainerService/maintenanceWindows@2026-04-02-preview" |
AbsoluteMonthlySchedule
| Name | Description | Value |
|---|---|---|
| dayOfMonth | The date of the month. | int Constraints: Min value = 1 Max value = 31 (required) |
| intervalMonths | Specifies the number of months between each set of occurrences. | int Constraints: Min value = 1 Max value = 6 (required) |
DailySchedule
| Name | Description | Value |
|---|---|---|
| intervalDays | Specifies the number of days between each set of occurrences. | int Constraints: Min value = 1 Max value = 7 (required) |
DateSpan
| Name | Description | Value |
|---|---|---|
| end | The end date of the date span. | string (required) |
| start | The start date of the date span. | string (required) |
MaintenanceWindowResourceProperties
| Name | Description | Value |
|---|---|---|
| durationHours | Length of the maintenance window in hours. | int Constraints: Min value = 4 Max value = 24 (required) |
| notAllowedDates | Date ranges during which maintenance is not allowed. 'utcOffset' applies to these dates. For example, with 'utcOffset: +02:00' and a date span of '2026-12-23' to '2027-01-03', maintenance will be blocked from '2026-12-22 22:00' to '2027-01-03 22:00' in UTC time. |
DateSpan[] |
| schedule | Recurrence schedule for the maintenance window. One and only one of the schedule types should be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. |
Schedule (required) |
| startDate | The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used. If not specified, the maintenance window will be active right away. |
string |
| startTime | The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. |
string Constraints: Pattern = ^([01]\d|2[0-3]):[0-5]\d$ (required) |
| utcOffset | The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'. Note: this is a static offset and does not adjust for Daylight Saving Time. Customers in DST-observing regions should pick the offset that matches their preferred wall-clock time year-round; the maintenance window will shift by one hour relative to local time when DST starts or ends. |
string Constraints: Pattern = ^[+-](0\d|1[0-4]):(00|15|30|45)$ |
RelativeMonthlySchedule
| Name | Description | Value |
|---|---|---|
| dayOfWeek | Specifies on which day of the week the maintenance occurs. | 'Friday' 'Monday' 'Saturday' 'Sunday' 'Thursday' 'Tuesday' 'Wednesday' (required) |
| intervalMonths | Specifies the number of months between each set of occurrences. | int Constraints: Min value = 1 Max value = 6 (required) |
| weekIndex | The week index. Specifies on which week of the month the dayOfWeek applies. | 'First' 'Fourth' 'Last' 'Second' 'Third' (required) |
Schedule
| Name | Description | Value |
|---|---|---|
| absoluteMonthly | For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. | AbsoluteMonthlySchedule |
| daily | For schedules like: 'recur every day' or 'recur every 3 days'. | DailySchedule |
| relativeMonthly | For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. | RelativeMonthlySchedule |
| weekly | For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. | WeeklySchedule |
TrackedResourceTags
| Name | Description | Value |
|---|
WeeklySchedule
| Name | Description | Value |
|---|---|---|
| dayOfWeek | Specifies on which day of the week the maintenance occurs. | 'Friday' 'Monday' 'Saturday' 'Sunday' 'Thursday' 'Tuesday' 'Wednesday' (required) |
| intervalWeeks | Specifies the number of weeks between each set of occurrences. | int Constraints: Min value = 1 Max value = 4 (required) |