Schedule

class Schedule : KotlinCustomResource

Manages automated startup and shutdown schedules for Azure Dev Test Lab.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.devtest.Lab;
import com.pulumi.azure.devtest.LabArgs;
import com.pulumi.azure.devtest.Schedule;
import com.pulumi.azure.devtest.ScheduleArgs;
import com.pulumi.azure.devtest.inputs.ScheduleWeeklyRecurrenceArgs;
import com.pulumi.azure.devtest.inputs.ScheduleNotificationSettingsArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleLab = new Lab("exampleLab", LabArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSchedule = new Schedule("exampleSchedule", ScheduleArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.labName(exampleLab.name())
.weeklyRecurrence(ScheduleWeeklyRecurrenceArgs.builder()
.time("1100")
.weekDays(
"Monday",
"Tuesday")
.build())
.timeZoneId("Pacific Standard Time")
.taskType("LabVmsStartupTask")
.notificationSettings()
.tags(Map.of("environment", "Production"))
.build());
}
}

Import

DevTest Schedule's can be imported using the resource id, e.g.

$ pulumi import azure:devtest/schedule:Schedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DevTestLab/labs/myDevTestLab/schedules/labvmautostart

Properties

Link copied to clipboard

The properties of a daily schedule. If the schedule occurs once each day of the week, specify the daily recurrence. A daily_recurrence block as defined below.

Link copied to clipboard

The properties of an hourly schedule. If the schedule occurs multiple times a day, specify the hourly recurrence. A hourly_recurrence block as defined below.

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

The name of the dev test lab. Changing this forces a new resource to be created.

Link copied to clipboard
val location: Output<String>

The location where the schedule is created. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>

The name of the dev test lab schedule. Valid value for name depends on the task_type. For instance for task_type LabVmsStartupTask the name needs to be LabVmAutoStart. Changing this forces a new resource to be created.

Link copied to clipboard

The notification setting of a schedule. A notification_settings as defined below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which to create the dev test lab schedule. Changing this forces a new resource to be created.

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

The status of this schedule. Possible values are Enabled and Disabled. Defaults to Disabled.

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

A mapping of tags to assign to the resource.

Link copied to clipboard
val taskType: Output<String>

The task type of the schedule. Possible values include LabVmsShutdownTask and LabVmAutoStart.

Link copied to clipboard
val timeZoneId: Output<String>

The time zone ID (e.g. Pacific Standard time).

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

The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A weekly_recurrence block as defined below.