Schedule

class Schedule : KotlinCustomResource

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}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

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

The name of the resource

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

Notes for this schedule.

Link copied to clipboard

Current provisioning state of the schedule.

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

The recurrence pattern of the scheduled actions.

Link copied to clipboard

Error details of last operation done on schedule.

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

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>

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

Link copied to clipboard

Metadata pertaining to creation and last modification of the schedule.

Link copied to clipboard
val timeZoneId: Output<String>

The IANA timezone id for the schedule.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>