MaintenanceConfiguration

class MaintenanceConfiguration : KotlinCustomResource

Maintenance configuration record type Uses Azure REST API version 2023-10-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-11-01-preview. Other available API versions: 2022-11-01-preview, 2023-04-01, 2023-09-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native maintenance [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

MaintenanceConfigurations_CreateOrUpdateForResource

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var maintenanceConfiguration = new AzureNative.Maintenance.MaintenanceConfiguration("maintenanceConfiguration", new()
{
Duration = "05:00",
ExpirationDateTime = "9999-12-31 00:00",
Location = "westus2",
MaintenanceScope = AzureNative.Maintenance.MaintenanceScope.OSImage,
Namespace = "Microsoft.Maintenance",
RecurEvery = "Day",
ResourceGroupName = "examplerg",
ResourceName = "configuration1",
StartDateTime = "2020-04-30 08:00",
TimeZone = "Pacific Standard Time",
Visibility = AzureNative.Maintenance.Visibility.Custom,
});
});
package main
import (
maintenance "github.com/pulumi/pulumi-azure-native-sdk/maintenance/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := maintenance.NewMaintenanceConfiguration(ctx, "maintenanceConfiguration", &maintenance.MaintenanceConfigurationArgs{
Duration: pulumi.String("05:00"),
ExpirationDateTime: pulumi.String("9999-12-31 00:00"),
Location: pulumi.String("westus2"),
MaintenanceScope: pulumi.String(maintenance.MaintenanceScopeOSImage),
Namespace: pulumi.String("Microsoft.Maintenance"),
RecurEvery: pulumi.String("Day"),
ResourceGroupName: pulumi.String("examplerg"),
ResourceName: pulumi.String("configuration1"),
StartDateTime: pulumi.String("2020-04-30 08:00"),
TimeZone: pulumi.String("Pacific Standard Time"),
Visibility: pulumi.String(maintenance.VisibilityCustom),
})
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.maintenance.MaintenanceConfiguration;
import com.pulumi.azurenative.maintenance.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()
.duration("05:00")
.expirationDateTime("9999-12-31 00:00")
.location("westus2")
.maintenanceScope("OSImage")
.namespace("Microsoft.Maintenance")
.recurEvery("Day")
.resourceGroupName("examplerg")
.resourceName("configuration1")
.startDateTime("2020-04-30 08:00")
.timeZone("Pacific Standard Time")
.visibility("Custom")
.build());
}
}

Import

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

$ pulumi import azure-native:maintenance:MaintenanceConfiguration configuration1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val duration: Output<String>?

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.

Link copied to clipboard

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.

Link copied to clipboard

Gets or sets extensionProperties of the maintenanceConfiguration

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The input parameters to be passed to the patch run operation.

Link copied to clipboard
val location: Output<String>?

Gets or sets location of the resource

Link copied to clipboard
val maintenanceScope: Output<String>?

Gets or sets maintenanceScope of the configuration

Link copied to clipboard
val name: Output<String>

Name of the resource

Link copied to clipboard
val namespace: Output<String>?

Gets or sets namespace of the resource

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val recurEvery: Output<String>?

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: '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: '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 'Month(s)' Comma separated list of month days or 'Month(s)' Weekday Monday-Sunday Optional Offset(No. of days). Offset value must be between -6 to 6 inclusive. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday, recurEvery: Month Last Sunday Offset-3, recurEvery: Month Third Sunday Offset6.

Link copied to clipboard
val startDateTime: Output<String>?

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.

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Gets or sets tags of the resource

Link copied to clipboard
val timeZone: Output<String>?

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.

Link copied to clipboard
val type: Output<String>

Type of the resource

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val visibility: Output<String>?

Gets or sets the visibility of the configuration. The default value is 'Custom'