1. Packages
  2. Azure Native v2
  3. API Docs
  4. containerservice
  5. MaintenanceConfiguration
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.containerservice.MaintenanceConfiguration

Explore with Pulumi AI

See planned maintenance for more information about planned maintenance. Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2021-03-01.

Other available API versions: 2023-05-02-preview, 2023-06-01, 2023-06-02-preview, 2023-07-01, 2023-07-02-preview, 2023-08-01, 2023-08-02-preview, 2023-09-01, 2023-09-02-preview, 2023-10-01, 2023-10-02-preview, 2023-11-01, 2023-11-02-preview, 2024-01-01, 2024-01-02-preview, 2024-02-01, 2024-02-02-preview, 2024-03-02-preview, 2024-04-02-preview, 2024-05-01, 2024-05-02-preview, 2024-06-02-preview, 2024-07-01, 2024-07-02-preview, 2024-08-01, 2024-09-01, 2024-09-02-preview.

Example Usage

Create/Update Maintenance Configuration

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var maintenanceConfiguration = new AzureNative.ContainerService.MaintenanceConfiguration("maintenanceConfiguration", new()
    {
        ConfigName = "default",
        NotAllowedTime = new[]
        {
            new AzureNative.ContainerService.Inputs.TimeSpanArgs
            {
                End = "2020-11-30T12:00:00Z",
                Start = "2020-11-26T03:00:00Z",
            },
        },
        ResourceGroupName = "rg1",
        ResourceName = "clustername1",
        TimeInWeek = new[]
        {
            new AzureNative.ContainerService.Inputs.TimeInWeekArgs
            {
                Day = AzureNative.ContainerService.WeekDay.Monday,
                HourSlots = new[]
                {
                    1,
                    2,
                },
            },
        },
    });

});
Copy
package main

import (
	containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := containerservice.NewMaintenanceConfiguration(ctx, "maintenanceConfiguration", &containerservice.MaintenanceConfigurationArgs{
			ConfigName: pulumi.String("default"),
			NotAllowedTime: containerservice.TimeSpanArray{
				&containerservice.TimeSpanArgs{
					End:   pulumi.String("2020-11-30T12:00:00Z"),
					Start: pulumi.String("2020-11-26T03:00:00Z"),
				},
			},
			ResourceGroupName: pulumi.String("rg1"),
			ResourceName:      pulumi.String("clustername1"),
			TimeInWeek: containerservice.TimeInWeekArray{
				&containerservice.TimeInWeekArgs{
					Day: pulumi.String(containerservice.WeekDayMonday),
					HourSlots: pulumi.IntArray{
						pulumi.Int(1),
						pulumi.Int(2),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.MaintenanceConfiguration;
import com.pulumi.azurenative.containerservice.MaintenanceConfigurationArgs;
import com.pulumi.azurenative.containerservice.inputs.TimeSpanArgs;
import com.pulumi.azurenative.containerservice.inputs.TimeInWeekArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var maintenanceConfiguration = new MaintenanceConfiguration("maintenanceConfiguration", MaintenanceConfigurationArgs.builder()
            .configName("default")
            .notAllowedTime(TimeSpanArgs.builder()
                .end("2020-11-30T12:00:00Z")
                .start("2020-11-26T03:00:00Z")
                .build())
            .resourceGroupName("rg1")
            .resourceName("clustername1")
            .timeInWeek(TimeInWeekArgs.builder()
                .day("Monday")
                .hourSlots(                
                    1,
                    2)
                .build())
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const maintenanceConfiguration = new azure_native.containerservice.MaintenanceConfiguration("maintenanceConfiguration", {
    configName: "default",
    notAllowedTime: [{
        end: "2020-11-30T12:00:00Z",
        start: "2020-11-26T03:00:00Z",
    }],
    resourceGroupName: "rg1",
    resourceName: "clustername1",
    timeInWeek: [{
        day: azure_native.containerservice.WeekDay.Monday,
        hourSlots: [
            1,
            2,
        ],
    }],
});
Copy
import pulumi
import pulumi_azure_native as azure_native

maintenance_configuration = azure_native.containerservice.MaintenanceConfiguration("maintenanceConfiguration",
    config_name="default",
    not_allowed_time=[{
        "end": "2020-11-30T12:00:00Z",
        "start": "2020-11-26T03:00:00Z",
    }],
    resource_group_name="rg1",
    resource_name_="clustername1",
    time_in_week=[{
        "day": azure_native.containerservice.WeekDay.MONDAY,
        "hour_slots": [
            1,
            2,
        ],
    }])
Copy
resources:
  maintenanceConfiguration:
    type: azure-native:containerservice:MaintenanceConfiguration
    properties:
      configName: default
      notAllowedTime:
        - end: 2020-11-30T12:00:00Z
          start: 2020-11-26T03:00:00Z
      resourceGroupName: rg1
      resourceName: clustername1
      timeInWeek:
        - day: Monday
          hourSlots:
            - 1
            - 2
Copy

Create MaintenanceConfiguration Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MaintenanceConfiguration(name: string, args: MaintenanceConfigurationArgs, opts?: CustomResourceOptions);
@overload
def MaintenanceConfiguration(resource_name: str,
                             args: MaintenanceConfigurationArgs,
                             opts: Optional[ResourceOptions] = None)

@overload
def MaintenanceConfiguration(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             resource_group_name: Optional[str] = None,
                             resource_name_: Optional[str] = None,
                             config_name: Optional[str] = None,
                             not_allowed_time: Optional[Sequence[TimeSpanArgs]] = None,
                             time_in_week: Optional[Sequence[TimeInWeekArgs]] = None)
func NewMaintenanceConfiguration(ctx *Context, name string, args MaintenanceConfigurationArgs, opts ...ResourceOption) (*MaintenanceConfiguration, error)
public MaintenanceConfiguration(string name, MaintenanceConfigurationArgs args, CustomResourceOptions? opts = null)
public MaintenanceConfiguration(String name, MaintenanceConfigurationArgs args)
public MaintenanceConfiguration(String name, MaintenanceConfigurationArgs args, CustomResourceOptions options)
type: azure-native:containerservice:MaintenanceConfiguration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MaintenanceConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MaintenanceConfigurationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MaintenanceConfigurationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MaintenanceConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MaintenanceConfigurationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var azure_nativeMaintenanceConfigurationResource = new AzureNative.Containerservice.MaintenanceConfiguration("azure-nativeMaintenanceConfigurationResource", new()
{
    ResourceGroupName = "string",
    ResourceName = "string",
    ConfigName = "string",
    NotAllowedTime = new[]
    {
        
        {
            { "end", "string" },
            { "start", "string" },
        },
    },
    TimeInWeek = new[]
    {
        
        {
            { "day", "string" },
            { "hourSlots", new[]
            {
                0,
            } },
        },
    },
});
Copy
example, err := containerservice.NewMaintenanceConfiguration(ctx, "azure-nativeMaintenanceConfigurationResource", &containerservice.MaintenanceConfigurationArgs{
	ResourceGroupName: "string",
	ResourceName:      "string",
	ConfigName:        "string",
	NotAllowedTime: []map[string]interface{}{
		map[string]interface{}{
			"end":   "string",
			"start": "string",
		},
	},
	TimeInWeek: []map[string]interface{}{
		map[string]interface{}{
			"day": "string",
			"hourSlots": []float64{
				0,
			},
		},
	},
})
Copy
var azure_nativeMaintenanceConfigurationResource = new MaintenanceConfiguration("azure-nativeMaintenanceConfigurationResource", MaintenanceConfigurationArgs.builder()
    .resourceGroupName("string")
    .resourceName("string")
    .configName("string")
    .notAllowedTime(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .timeInWeek(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
azure_native_maintenance_configuration_resource = azure_native.containerservice.MaintenanceConfiguration("azure-nativeMaintenanceConfigurationResource",
    resource_group_name=string,
    resource_name_=string,
    config_name=string,
    not_allowed_time=[{
        end: string,
        start: string,
    }],
    time_in_week=[{
        day: string,
        hourSlots: [0],
    }])
Copy
const azure_nativeMaintenanceConfigurationResource = new azure_native.containerservice.MaintenanceConfiguration("azure-nativeMaintenanceConfigurationResource", {
    resourceGroupName: "string",
    resourceName: "string",
    configName: "string",
    notAllowedTime: [{
        end: "string",
        start: "string",
    }],
    timeInWeek: [{
        day: "string",
        hourSlots: [0],
    }],
});
Copy
type: azure-native:containerservice:MaintenanceConfiguration
properties:
    configName: string
    notAllowedTime:
        - end: string
          start: string
    resourceGroupName: string
    resourceName: string
    timeInWeek:
        - day: string
          hourSlots:
            - 0
Copy

MaintenanceConfiguration Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The MaintenanceConfiguration resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the managed cluster resource.
ConfigName Changes to this property will trigger replacement. string
The name of the maintenance configuration.
NotAllowedTime List<Pulumi.AzureNative.ContainerService.Inputs.TimeSpan>
Time slots on which upgrade is not allowed.
TimeInWeek List<Pulumi.AzureNative.ContainerService.Inputs.TimeInWeek>
If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the managed cluster resource.
ConfigName Changes to this property will trigger replacement. string
The name of the maintenance configuration.
NotAllowedTime []TimeSpanArgs
Time slots on which upgrade is not allowed.
TimeInWeek []TimeInWeekArgs
If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
resourceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the managed cluster resource.
configName Changes to this property will trigger replacement. String
The name of the maintenance configuration.
notAllowedTime List<TimeSpan>
Time slots on which upgrade is not allowed.
timeInWeek List<TimeInWeek>
If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
resourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the managed cluster resource.
configName Changes to this property will trigger replacement. string
The name of the maintenance configuration.
notAllowedTime TimeSpan[]
Time slots on which upgrade is not allowed.
timeInWeek TimeInWeek[]
If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
resource_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the managed cluster resource.
config_name Changes to this property will trigger replacement. str
The name of the maintenance configuration.
not_allowed_time Sequence[TimeSpanArgs]
Time slots on which upgrade is not allowed.
time_in_week Sequence[TimeInWeekArgs]
If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
resourceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the managed cluster resource.
configName Changes to this property will trigger replacement. String
The name of the maintenance configuration.
notAllowedTime List<Property Map>
Time slots on which upgrade is not allowed.
timeInWeek List<Property Map>
If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.

Outputs

All input properties are implicitly available as output properties. Additionally, the MaintenanceConfiguration resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
SystemData Pulumi.AzureNative.ContainerService.Outputs.SystemDataResponse
The system metadata relating to this resource.
Type string
Resource type
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
SystemData SystemDataResponse
The system metadata relating to this resource.
Type string
Resource type
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource that is unique within a resource group. This name can be used to access the resource.
systemData SystemDataResponse
The system metadata relating to this resource.
type String
Resource type
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
systemData SystemDataResponse
The system metadata relating to this resource.
type string
Resource type
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource that is unique within a resource group. This name can be used to access the resource.
system_data SystemDataResponse
The system metadata relating to this resource.
type str
Resource type
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource that is unique within a resource group. This name can be used to access the resource.
systemData Property Map
The system metadata relating to this resource.
type String
Resource type

Supporting Types

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

TimeInWeek
, TimeInWeekArgs

Day string | Pulumi.AzureNative.ContainerService.WeekDay
The day of the week.
HourSlots List<int>
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
Day string | WeekDay
The day of the week.
HourSlots []int
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
day String | WeekDay
The day of the week.
hourSlots List<Integer>
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
day string | WeekDay
The day of the week.
hourSlots number[]
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
day str | WeekDay
The day of the week.
hour_slots Sequence[int]
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
day String | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"
The day of the week.
hourSlots List<Number>
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.

TimeInWeekResponse
, TimeInWeekResponseArgs

Day string
The day of the week.
HourSlots List<int>
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
Day string
The day of the week.
HourSlots []int
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
day String
The day of the week.
hourSlots List<Integer>
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
day string
The day of the week.
hourSlots number[]
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
day str
The day of the week.
hour_slots Sequence[int]
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
day String
The day of the week.
hourSlots List<Number>
Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.

TimeSpan
, TimeSpanArgs

End string
The end of a time span
Start string
The start of a time span
End string
The end of a time span
Start string
The start of a time span
end String
The end of a time span
start String
The start of a time span
end string
The end of a time span
start string
The start of a time span
end str
The end of a time span
start str
The start of a time span
end String
The end of a time span
start String
The start of a time span

TimeSpanResponse
, TimeSpanResponseArgs

End string
The end of a time span
Start string
The start of a time span
End string
The end of a time span
Start string
The start of a time span
end String
The end of a time span
start String
The start of a time span
end string
The end of a time span
start string
The start of a time span
end str
The end of a time span
start str
The start of a time span
end String
The end of a time span
start String
The start of a time span

WeekDay
, WeekDayArgs

Sunday
Sunday
Monday
Monday
Tuesday
Tuesday
Wednesday
Wednesday
Thursday
Thursday
Friday
Friday
Saturday
Saturday
WeekDaySunday
Sunday
WeekDayMonday
Monday
WeekDayTuesday
Tuesday
WeekDayWednesday
Wednesday
WeekDayThursday
Thursday
WeekDayFriday
Friday
WeekDaySaturday
Saturday
Sunday
Sunday
Monday
Monday
Tuesday
Tuesday
Wednesday
Wednesday
Thursday
Thursday
Friday
Friday
Saturday
Saturday
Sunday
Sunday
Monday
Monday
Tuesday
Tuesday
Wednesday
Wednesday
Thursday
Thursday
Friday
Friday
Saturday
Saturday
SUNDAY
Sunday
MONDAY
Monday
TUESDAY
Tuesday
WEDNESDAY
Wednesday
THURSDAY
Thursday
FRIDAY
Friday
SATURDAY
Saturday
"Sunday"
Sunday
"Monday"
Monday
"Tuesday"
Tuesday
"Wednesday"
Wednesday
"Thursday"
Thursday
"Friday"
Friday
"Saturday"
Saturday

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:containerservice:MaintenanceConfiguration default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0