GlobalScheduleArgs

data class GlobalScheduleArgs(val dailyRecurrence: Output<DayDetailsArgs>? = null, val hourlyRecurrence: Output<HourDetailsArgs>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val notificationSettings: Output<NotificationSettingsArgs>? = null, val resourceGroupName: Output<String>? = null, val status: Output<Either<String, EnableStatus>>? = null, val tags: Output<Map<String, String>>? = null, val targetResourceId: Output<String>? = null, val taskType: Output<String>? = null, val timeZoneId: Output<String>? = null, val weeklyRecurrence: Output<WeekDetailsArgs>? = null) : ConvertibleToJava<GlobalScheduleArgs>

A schedule. Uses Azure REST API version 2018-09-15. In version 2.x of the Azure Native provider, it used API version 2018-09-15.

Example Usage

GlobalSchedules_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var globalSchedule = new AzureNative.DevTestLab.GlobalSchedule("globalSchedule", new()
{
Name = "labvmautostart",
ResourceGroupName = "resourceGroupName",
Status = AzureNative.DevTestLab.EnableStatus.Enabled,
TaskType = "LabVmsStartupTask",
TimeZoneId = "Hawaiian Standard Time",
WeeklyRecurrence = new AzureNative.DevTestLab.Inputs.WeekDetailsArgs
{
Time = "0700",
Weekdays = new[]
{
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
},
},
});
});
package main
import (
devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewGlobalSchedule(ctx, "globalSchedule", &devtestlab.GlobalScheduleArgs{
Name: pulumi.String("labvmautostart"),
ResourceGroupName: pulumi.String("resourceGroupName"),
Status: pulumi.String(devtestlab.EnableStatusEnabled),
TaskType: pulumi.String("LabVmsStartupTask"),
TimeZoneId: pulumi.String("Hawaiian Standard Time"),
WeeklyRecurrence: &devtestlab.WeekDetailsArgs{
Time: pulumi.String("0700"),
Weekdays: pulumi.StringArray{
pulumi.String("Monday"),
pulumi.String("Tuesday"),
pulumi.String("Wednesday"),
pulumi.String("Thursday"),
pulumi.String("Friday"),
pulumi.String("Saturday"),
},
},
})
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.devtestlab.GlobalSchedule;
import com.pulumi.azurenative.devtestlab.GlobalScheduleArgs;
import com.pulumi.azurenative.devtestlab.inputs.WeekDetailsArgs;
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 globalSchedule = new GlobalSchedule("globalSchedule", GlobalScheduleArgs.builder()
.name("labvmautostart")
.resourceGroupName("resourceGroupName")
.status("Enabled")
.taskType("LabVmsStartupTask")
.timeZoneId("Hawaiian Standard Time")
.weeklyRecurrence(WeekDetailsArgs.builder()
.time("0700")
.weekdays(
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday")
.build())
.build());
}
}

Import

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

$ pulumi import azure-native:devtestlab:GlobalSchedule LabVmAutoStart /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}

Constructors

Link copied to clipboard
constructor(dailyRecurrence: Output<DayDetailsArgs>? = null, hourlyRecurrence: Output<HourDetailsArgs>? = null, location: Output<String>? = null, name: Output<String>? = null, notificationSettings: Output<NotificationSettingsArgs>? = null, resourceGroupName: Output<String>? = null, status: Output<Either<String, EnableStatus>>? = null, tags: Output<Map<String, String>>? = null, targetResourceId: Output<String>? = null, taskType: Output<String>? = null, timeZoneId: Output<String>? = null, weeklyRecurrence: Output<WeekDetailsArgs>? = null)

Properties

Link copied to clipboard
val dailyRecurrence: Output<DayDetailsArgs>? = null

If the schedule will occur once each day of the week, specify the daily recurrence.

Link copied to clipboard
val hourlyRecurrence: Output<HourDetailsArgs>? = null

If the schedule will occur multiple times a day, specify the hourly recurrence.

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

The location of the resource.

Link copied to clipboard
val name: Output<String>? = null

The name of the schedule.

Link copied to clipboard

Notification settings.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard
val status: Output<Either<String, EnableStatus>>? = null

The status of the schedule (i.e. Enabled, Disabled)

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

The tags of the resource.

Link copied to clipboard
val targetResourceId: Output<String>? = null

The resource ID to which the schedule belongs

Link copied to clipboard
val taskType: Output<String>? = null

The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).

Link copied to clipboard
val timeZoneId: Output<String>? = null

The time zone ID (e.g. China Standard Time, Greenland Standard Time, Pacific Standard time, etc.). The possible values for this property can be found in IReadOnlyCollection<string> TimeZoneConverter.TZConvert.KnownWindowsTimeZoneIds (https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/README.md)

Link copied to clipboard
val weeklyRecurrence: Output<WeekDetailsArgs>? = null

If the schedule will occur only some days of the week, specify the weekly recurrence.

Functions

Link copied to clipboard
open override fun toJava(): GlobalScheduleArgs