Schedule Args
data class ScheduleArgs(val labName: Output<String>? = null, val notes: Output<String>? = null, val recurrencePattern: Output<RecurrencePatternArgs>? = null, val resourceGroupName: Output<String>? = null, val scheduleName: Output<String>? = null, val startAt: Output<String>? = null, val stopAt: Output<String>? = null, val timeZoneId: Output<String>? = null) : ConvertibleToJava<ScheduleArgs>
Schedule for automatically turning virtual machines in a lab on and off at specified times. API Version: 2021-10-01-preview.
Example Usage
putSchedule
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var schedule = new AzureNative.LabServices.Schedule("schedule", new()
{
LabName = "testlab",
Notes = "Schedule 1 for students",
RecurrencePattern = new AzureNative.LabServices.Inputs.RecurrencePatternArgs
{
ExpirationDate = "2020-08-14",
Frequency = AzureNative.LabServices.RecurrenceFrequency.Daily,
Interval = 2,
},
ResourceGroupName = "testrg123",
ScheduleName = "schedule1",
StartAt = "2020-05-26T12:00:00Z",
StopAt = "2020-05-26T18:00:00Z",
TimeZoneId = "America/Los_Angeles",
});
});
Content copied to clipboard
package main
import (
labservices "github.com/pulumi/pulumi-azure-native-sdk/labservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := labservices.NewSchedule(ctx, "schedule", &labservices.ScheduleArgs{
LabName: pulumi.String("testlab"),
Notes: pulumi.String("Schedule 1 for students"),
RecurrencePattern: &labservices.RecurrencePatternArgs{
ExpirationDate: pulumi.String("2020-08-14"),
Frequency: labservices.RecurrenceFrequencyDaily,
Interval: pulumi.Int(2),
},
ResourceGroupName: pulumi.String("testrg123"),
ScheduleName: pulumi.String("schedule1"),
StartAt: pulumi.String("2020-05-26T12:00:00Z"),
StopAt: pulumi.String("2020-05-26T18:00:00Z"),
TimeZoneId: pulumi.String("America/Los_Angeles"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.labservices.Schedule;
import com.pulumi.azurenative.labservices.ScheduleArgs;
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 schedule = new Schedule("schedule", ScheduleArgs.builder()
.labName("testlab")
.notes("Schedule 1 for students")
.recurrencePattern(Map.ofEntries(
Map.entry("expirationDate", "2020-08-14"),
Map.entry("frequency", "Daily"),
Map.entry("interval", 2)
))
.resourceGroupName("testrg123")
.scheduleName("schedule1")
.startAt("2020-05-26T12:00:00Z")
.stopAt("2020-05-26T18:00:00Z")
.timeZoneId("America/Los_Angeles")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:labservices:Schedule schedule1 /subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1
Content copied to clipboard
Constructors
Link copied to clipboard
fun ScheduleArgs(labName: Output<String>? = null, notes: Output<String>? = null, recurrencePattern: Output<RecurrencePatternArgs>? = null, resourceGroupName: Output<String>? = null, scheduleName: Output<String>? = null, startAt: Output<String>? = null, stopAt: Output<String>? = null, timeZoneId: Output<String>? = null)