ScheduleArgs

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. Uses Azure REST API version 2023-06-07. In version 2.x of the Azure Native provider, it used API version 2022-08-01. Other available API versions: 2021-10-01-preview, 2021-11-15-preview, 2022-08-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native labservices [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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-14T23:59:59Z",
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",
});
});
package main
import (
labservices "github.com/pulumi/pulumi-azure-native-sdk/labservices/v3"
"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-14T23:59:59Z"),
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
})
}
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 com.pulumi.azurenative.labservices.inputs.RecurrencePatternArgs;
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(RecurrencePatternArgs.builder()
.expirationDate("2020-08-14T23:59:59Z")
.frequency("Daily")
.interval(2)
.build())
.resourceGroupName("testrg123")
.scheduleName("schedule1")
.startAt("2020-05-26T12:00:00Z")
.stopAt("2020-05-26T18:00:00Z")
.timeZoneId("America/Los_Angeles")
.build());
}
}

Import

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

$ pulumi import azure-native:labservices:Schedule schedule1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/schedules/{scheduleName}

Constructors

Link copied to clipboard
constructor(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)

Properties

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

The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.

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

Notes for this schedule.

Link copied to clipboard

The recurrence pattern of the scheduled actions.

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

The name of the resource group. The name is case insensitive.

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

The name of the schedule that uniquely identifies it within containing lab. Used in resource URIs.

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

When lab user virtual machines will be started. Timestamp offsets will be ignored and timeZoneId is used instead.

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

When lab user virtual machines will be stopped. Timestamp offsets will be ignored and timeZoneId is used instead.

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

The IANA timezone id for the schedule.

Functions

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