azure-native.containerservice.MaintenanceConfiguration
Explore with Pulumi AI
maintenance configuration. API Version: 2021-03-01.
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 = "Monday",
                HourSlots = new[]
                {
                    1,
                    2,
                },
            },
        },
    });
});
package main
import (
	containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice"
	"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.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.TimeInWeekArgs{
				{
					Day: pulumi.String("Monday"),
					HourSlots: pulumi.IntArray{
						pulumi.Int(1),
						pulumi.Int(2),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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(Map.ofEntries(
                Map.entry("end", "2020-11-30T12:00:00Z"),
                Map.entry("start", "2020-11-26T03:00:00Z")
            ))
            .resourceGroupName("rg1")
            .resourceName("clustername1")
            .timeInWeek(Map.ofEntries(
                Map.entry("day", "Monday"),
                Map.entry("hourSlots",                 
                    1,
                    2)
            ))
            .build());
    }
}
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: "Monday",
        hourSlots: [
            1,
            2,
        ],
    }],
});
import pulumi
import pulumi_azure_native as azure_native
maintenance_configuration = azure_native.containerservice.MaintenanceConfiguration("maintenanceConfiguration",
    config_name="default",
    not_allowed_time=[azure_native.containerservice.TimeSpanArgs(
        end="2020-11-30T12:00:00Z",
        start="2020-11-26T03:00:00Z",
    )],
    resource_group_name="rg1",
    resource_name_="clustername1",
    time_in_week=[azure_native.containerservice.TimeInWeekArgs(
        day="Monday",
        hour_slots=[
            1,
            2,
        ],
    )])
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
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 string
- The unique name of the resource.
- args MaintenanceConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args MaintenanceConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MaintenanceConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 maintenanceConfigurationResource = new AzureNative.Containerservice.MaintenanceConfiguration("maintenanceConfigurationResource", new()
{
    ResourceGroupName = "string",
    ResourceName = "string",
    ConfigName = "string",
    NotAllowedTime = new[]
    {
        
        {
            { "end", "string" },
            { "start", "string" },
        },
    },
    TimeInWeek = new[]
    {
        
        {
            { "day", "string" },
            { "hourSlots", new[]
            {
                0,
            } },
        },
    },
});
example, err := containerservice.NewMaintenanceConfiguration(ctx, "maintenanceConfigurationResource", &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,
			},
		},
	},
})
var maintenanceConfigurationResource = new MaintenanceConfiguration("maintenanceConfigurationResource", 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());
maintenance_configuration_resource = azure_native.containerservice.MaintenanceConfiguration("maintenanceConfigurationResource",
    resource_group_name=string,
    resource_name_=string,
    config_name=string,
    not_allowed_time=[{
        end: string,
        start: string,
    }],
    time_in_week=[{
        day: string,
        hourSlots: [0],
    }])
const maintenanceConfigurationResource = new azure_native.containerservice.MaintenanceConfiguration("maintenanceConfigurationResource", {
    resourceGroupName: "string",
    resourceName: "string",
    configName: "string",
    notAllowedTime: [{
        end: "string",
        start: "string",
    }],
    timeInWeek: [{
        day: "string",
        hourSlots: [0],
    }],
});
type: azure-native:containerservice:MaintenanceConfiguration
properties:
    configName: string
    notAllowedTime:
        - end: string
          start: string
    resourceGroupName: string
    resourceName: string
    timeInWeek:
        - day: string
          hourSlots:
            - 0
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:
- ResourceGroup stringName 
- The name of the resource group.
- ResourceName string
- The name of the managed cluster resource.
- ConfigName string
- The name of the maintenance configuration.
- NotAllowed List<Pulumi.Time Azure Native. Container Service. Inputs. Time Span> 
- Time slots on which upgrade is not allowed.
- TimeIn List<Pulumi.Week Azure Native. Container Service. Inputs. Time In Week> 
- Weekday time slots allowed to upgrade.
- ResourceGroup stringName 
- The name of the resource group.
- ResourceName string
- The name of the managed cluster resource.
- ConfigName string
- The name of the maintenance configuration.
- NotAllowed []TimeTime Span Args 
- Time slots on which upgrade is not allowed.
- TimeIn []TimeWeek In Week Args 
- Weekday time slots allowed to upgrade.
- resourceGroup StringName 
- The name of the resource group.
- resourceName String
- The name of the managed cluster resource.
- configName String
- The name of the maintenance configuration.
- notAllowed List<TimeTime Span> 
- Time slots on which upgrade is not allowed.
- timeIn List<TimeWeek In Week> 
- Weekday time slots allowed to upgrade.
- resourceGroup stringName 
- The name of the resource group.
- resourceName string
- The name of the managed cluster resource.
- configName string
- The name of the maintenance configuration.
- notAllowed TimeTime Span[] 
- Time slots on which upgrade is not allowed.
- timeIn TimeWeek In Week[] 
- Weekday time slots allowed to upgrade.
- resource_group_ strname 
- The name of the resource group.
- resource_name str
- The name of the managed cluster resource.
- config_name str
- The name of the maintenance configuration.
- not_allowed_ Sequence[Timetime Span Args] 
- Time slots on which upgrade is not allowed.
- time_in_ Sequence[Timeweek In Week Args] 
- Weekday time slots allowed to upgrade.
- resourceGroup StringName 
- The name of the resource group.
- resourceName String
- The name of the managed cluster resource.
- configName String
- The name of the maintenance configuration.
- notAllowed List<Property Map>Time 
- Time slots on which upgrade is not allowed.
- timeIn List<Property Map>Week 
- Weekday time slots allowed to upgrade.
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.Azure Native. Container Service. Outputs. System Data Response 
- The system meta data 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 SystemData Response 
- The system meta data 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 SystemData Response 
- The system meta data 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 SystemData Response 
- The system meta data 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 SystemData Response 
- The system meta data 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 meta data 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.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- 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.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- 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.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- 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.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- 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_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- 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.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
TimeInWeek, TimeInWeekArgs      
- Day
string | Pulumi.Azure Native. Container Service. Week Day 
- A day in a week.
- HourSlots List<int>
- hour slots in a day.
- day
str | WeekDay 
- A day in a week.
- hour_slots Sequence[int]
- hour slots in a day.
- day String | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"
- A day in a week.
- hourSlots List<Number>
- hour slots in a day.
TimeInWeekResponse, TimeInWeekResponseArgs        
- day str
- A day in a week.
- hour_slots Sequence[int]
- hour slots in a day.
TimeSpan, TimeSpanArgs    
TimeSpanResponse, TimeSpanResponseArgs      
WeekDay, WeekDayArgs    
- Sunday
- Sunday
- Monday
- Monday
- Tuesday
- Tuesday
- Wednesday
- Wednesday
- Thursday
- Thursday
- Friday
- Friday
- Saturday
- Saturday
- WeekDay Sunday 
- Sunday
- WeekDay Monday 
- Monday
- WeekDay Tuesday 
- Tuesday
- WeekDay Wednesday 
- Wednesday
- WeekDay Thursday 
- Thursday
- WeekDay Friday 
- Friday
- WeekDay 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
- "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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0