1. Packages
  2. Azure Native v2
  3. API Docs
  4. app
  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.app.MaintenanceConfiguration

Explore with Pulumi AI

Information about the Maintenance Configuration resource. Azure REST API version: 2024-10-02-preview.

Example Usage

ManagedEnvironmentMaintenanceConfigurationsCreateOrUpdate

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

return await Deployment.RunAsync(() => 
{
    var maintenanceConfiguration = new AzureNative.App.MaintenanceConfiguration("maintenanceConfiguration", new()
    {
        ConfigName = "default",
        EnvironmentName = "managedEnv",
        ResourceGroupName = "rg1",
        ScheduledEntries = new[]
        {
            new AzureNative.App.Inputs.ScheduledEntryArgs
            {
                DurationHours = 9,
                StartHourUtc = 12,
                WeekDay = AzureNative.App.WeekDay.Sunday,
            },
        },
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := app.NewMaintenanceConfiguration(ctx, "maintenanceConfiguration", &app.MaintenanceConfigurationArgs{
			ConfigName:        pulumi.String("default"),
			EnvironmentName:   pulumi.String("managedEnv"),
			ResourceGroupName: pulumi.String("rg1"),
			ScheduledEntries: app.ScheduledEntryArray{
				&app.ScheduledEntryArgs{
					DurationHours: pulumi.Int(9),
					StartHourUtc:  pulumi.Int(12),
					WeekDay:       app.WeekDaySunday,
				},
			},
		})
		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.app.MaintenanceConfiguration;
import com.pulumi.azurenative.app.MaintenanceConfigurationArgs;
import com.pulumi.azurenative.app.inputs.ScheduledEntryArgs;
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")
            .environmentName("managedEnv")
            .resourceGroupName("rg1")
            .scheduledEntries(ScheduledEntryArgs.builder()
                .durationHours(9)
                .startHourUtc(12)
                .weekDay("Sunday")
                .build())
            .build());

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

const maintenanceConfiguration = new azure_native.app.MaintenanceConfiguration("maintenanceConfiguration", {
    configName: "default",
    environmentName: "managedEnv",
    resourceGroupName: "rg1",
    scheduledEntries: [{
        durationHours: 9,
        startHourUtc: 12,
        weekDay: azure_native.app.WeekDay.Sunday,
    }],
});
Copy
import pulumi
import pulumi_azure_native as azure_native

maintenance_configuration = azure_native.app.MaintenanceConfiguration("maintenanceConfiguration",
    config_name="default",
    environment_name="managedEnv",
    resource_group_name="rg1",
    scheduled_entries=[{
        "duration_hours": 9,
        "start_hour_utc": 12,
        "week_day": azure_native.app.WeekDay.SUNDAY,
    }])
Copy
resources:
  maintenanceConfiguration:
    type: azure-native:app:MaintenanceConfiguration
    properties:
      configName: default
      environmentName: managedEnv
      resourceGroupName: rg1
      scheduledEntries:
        - durationHours: 9
          startHourUtc: 12
          weekDay: Sunday
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,
                             environment_name: Optional[str] = None,
                             resource_group_name: Optional[str] = None,
                             scheduled_entries: Optional[Sequence[ScheduledEntryArgs]] = None,
                             config_name: Optional[str] = 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:app: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 maintenanceConfigurationResource = new AzureNative.App.MaintenanceConfiguration("maintenanceConfigurationResource", new()
{
    EnvironmentName = "string",
    ResourceGroupName = "string",
    ScheduledEntries = new[]
    {
        
        {
            { "durationHours", 0 },
            { "startHourUtc", 0 },
            { "weekDay", "Monday" },
        },
    },
    ConfigName = "string",
});
Copy
example, err := app.NewMaintenanceConfiguration(ctx, "maintenanceConfigurationResource", &app.MaintenanceConfigurationArgs{
	EnvironmentName:   "string",
	ResourceGroupName: "string",
	ScheduledEntries: []map[string]interface{}{
		map[string]interface{}{
			"durationHours": 0,
			"startHourUtc":  0,
			"weekDay":       "Monday",
		},
	},
	ConfigName: "string",
})
Copy
var maintenanceConfigurationResource = new MaintenanceConfiguration("maintenanceConfigurationResource", MaintenanceConfigurationArgs.builder()
    .environmentName("string")
    .resourceGroupName("string")
    .scheduledEntries(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .configName("string")
    .build());
Copy
maintenance_configuration_resource = azure_native.app.MaintenanceConfiguration("maintenanceConfigurationResource",
    environment_name=string,
    resource_group_name=string,
    scheduled_entries=[{
        durationHours: 0,
        startHourUtc: 0,
        weekDay: Monday,
    }],
    config_name=string)
Copy
const maintenanceConfigurationResource = new azure_native.app.MaintenanceConfiguration("maintenanceConfigurationResource", {
    environmentName: "string",
    resourceGroupName: "string",
    scheduledEntries: [{
        durationHours: 0,
        startHourUtc: 0,
        weekDay: "Monday",
    }],
    configName: "string",
});
Copy
type: azure-native:app:MaintenanceConfiguration
properties:
    configName: string
    environmentName: string
    resourceGroupName: string
    scheduledEntries:
        - durationHours: 0
          startHourUtc: 0
          weekDay: Monday
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:

EnvironmentName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Managed Environment.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ScheduledEntries This property is required. List<Pulumi.AzureNative.App.Inputs.ScheduledEntry>
List of maintenance schedules for a managed environment.
ConfigName Changes to this property will trigger replacement. string
The name of the maintenance configuration.
EnvironmentName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Managed Environment.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ScheduledEntries This property is required. []ScheduledEntryArgs
List of maintenance schedules for a managed environment.
ConfigName Changes to this property will trigger replacement. string
The name of the maintenance configuration.
environmentName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Managed Environment.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
scheduledEntries This property is required. List<ScheduledEntry>
List of maintenance schedules for a managed environment.
configName Changes to this property will trigger replacement. String
The name of the maintenance configuration.
environmentName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Managed Environment.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
scheduledEntries This property is required. ScheduledEntry[]
List of maintenance schedules for a managed environment.
configName Changes to this property will trigger replacement. string
The name of the maintenance configuration.
environment_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Managed Environment.
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.
scheduled_entries This property is required. Sequence[ScheduledEntryArgs]
List of maintenance schedules for a managed environment.
config_name Changes to this property will trigger replacement. str
The name of the maintenance configuration.
environmentName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Managed Environment.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
scheduledEntries This property is required. List<Property Map>
List of maintenance schedules for a managed environment.
configName Changes to this property will trigger replacement. String
The name of the maintenance configuration.

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
SystemData Pulumi.AzureNative.App.Outputs.SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
SystemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
system_data SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
systemData Property Map
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

ScheduledEntry
, ScheduledEntryArgs

DurationHours This property is required. int
Length of maintenance window range from 8 to 24 hours.
StartHourUtc This property is required. int
Start hour after which managed environment maintenance can start from 0 to 23 hour.
WeekDay This property is required. Pulumi.AzureNative.App.WeekDay
Day of the week when a managed environment can be patched.
DurationHours This property is required. int
Length of maintenance window range from 8 to 24 hours.
StartHourUtc This property is required. int
Start hour after which managed environment maintenance can start from 0 to 23 hour.
WeekDay This property is required. WeekDay
Day of the week when a managed environment can be patched.
durationHours This property is required. Integer
Length of maintenance window range from 8 to 24 hours.
startHourUtc This property is required. Integer
Start hour after which managed environment maintenance can start from 0 to 23 hour.
weekDay This property is required. WeekDay
Day of the week when a managed environment can be patched.
durationHours This property is required. number
Length of maintenance window range from 8 to 24 hours.
startHourUtc This property is required. number
Start hour after which managed environment maintenance can start from 0 to 23 hour.
weekDay This property is required. WeekDay
Day of the week when a managed environment can be patched.
duration_hours This property is required. int
Length of maintenance window range from 8 to 24 hours.
start_hour_utc This property is required. int
Start hour after which managed environment maintenance can start from 0 to 23 hour.
week_day This property is required. WeekDay
Day of the week when a managed environment can be patched.
durationHours This property is required. Number
Length of maintenance window range from 8 to 24 hours.
startHourUtc This property is required. Number
Start hour after which managed environment maintenance can start from 0 to 23 hour.
weekDay This property is required. "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday"
Day of the week when a managed environment can be patched.

ScheduledEntryResponse
, ScheduledEntryResponseArgs

DurationHours This property is required. int
Length of maintenance window range from 8 to 24 hours.
StartHourUtc This property is required. int
Start hour after which managed environment maintenance can start from 0 to 23 hour.
WeekDay This property is required. string
Day of the week when a managed environment can be patched.
DurationHours This property is required. int
Length of maintenance window range from 8 to 24 hours.
StartHourUtc This property is required. int
Start hour after which managed environment maintenance can start from 0 to 23 hour.
WeekDay This property is required. string
Day of the week when a managed environment can be patched.
durationHours This property is required. Integer
Length of maintenance window range from 8 to 24 hours.
startHourUtc This property is required. Integer
Start hour after which managed environment maintenance can start from 0 to 23 hour.
weekDay This property is required. String
Day of the week when a managed environment can be patched.
durationHours This property is required. number
Length of maintenance window range from 8 to 24 hours.
startHourUtc This property is required. number
Start hour after which managed environment maintenance can start from 0 to 23 hour.
weekDay This property is required. string
Day of the week when a managed environment can be patched.
duration_hours This property is required. int
Length of maintenance window range from 8 to 24 hours.
start_hour_utc This property is required. int
Start hour after which managed environment maintenance can start from 0 to 23 hour.
week_day This property is required. str
Day of the week when a managed environment can be patched.
durationHours This property is required. Number
Length of maintenance window range from 8 to 24 hours.
startHourUtc This property is required. Number
Start hour after which managed environment maintenance can start from 0 to 23 hour.
weekDay This property is required. String
Day of the week when a managed environment can be patched.

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.

WeekDay
, WeekDayArgs

Monday
Monday
Tuesday
Tuesday
Wednesday
Wednesday
Thursday
Thursday
Friday
Friday
Saturday
Saturday
Sunday
Sunday
WeekDayMonday
Monday
WeekDayTuesday
Tuesday
WeekDayWednesday
Wednesday
WeekDayThursday
Thursday
WeekDayFriday
Friday
WeekDaySaturday
Saturday
WeekDaySunday
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
"Sunday"
Sunday

Import

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

$ pulumi import azure-native:app:MaintenanceConfiguration default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/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