Schedule Args
data class ScheduleArgs(val dailyRecurrence: Output<DayDetailsArgs>? = null, val hourlyRecurrence: Output<HourDetailsArgs>? = null, val labName: Output<String>? = 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<ScheduleArgs>
A schedule. API Version: 2018-09-15.
Example Usage
Schedules_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var schedule = new AzureNative.DevTestLab.Schedule("schedule", new()
{
DailyRecurrence = new AzureNative.DevTestLab.Inputs.DayDetailsArgs
{
Time = "{timeOfTheDayTheScheduleWillOccurEveryDay}",
},
HourlyRecurrence = new AzureNative.DevTestLab.Inputs.HourDetailsArgs
{
Minute = 30,
},
LabName = "{labName}",
Location = "{location}",
Name = "{scheduleName}",
NotificationSettings = new AzureNative.DevTestLab.Inputs.NotificationSettingsArgs
{
EmailRecipient = "{email}",
NotificationLocale = "EN",
Status = "{Enabled|Disabled}",
TimeInMinutes = 15,
WebhookUrl = "{webhookUrl}",
},
ResourceGroupName = "resourceGroupName",
Status = "{Enabled|Disabled}",
Tags =
{
{ "tagName1", "tagValue1" },
},
TargetResourceId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}",
TaskType = "{myLabVmTaskType}",
TimeZoneId = "Pacific Standard Time",
WeeklyRecurrence = new AzureNative.DevTestLab.Inputs.WeekDetailsArgs
{
Time = "{timeOfTheDayTheScheduleWillOccurOnThoseDays}",
Weekdays = new[]
{
"Monday",
"Wednesday",
"Friday",
},
},
});
});
Content copied to clipboard
package main
import (
devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewSchedule(ctx, "schedule", &devtestlab.ScheduleArgs{
DailyRecurrence: &devtestlab.DayDetailsArgs{
Time: pulumi.String("{timeOfTheDayTheScheduleWillOccurEveryDay}"),
},
HourlyRecurrence: &devtestlab.HourDetailsArgs{
Minute: pulumi.Int(30),
},
LabName: pulumi.String("{labName}"),
Location: pulumi.String("{location}"),
Name: pulumi.String("{scheduleName}"),
NotificationSettings: &devtestlab.NotificationSettingsArgs{
EmailRecipient: pulumi.String("{email}"),
NotificationLocale: pulumi.String("EN"),
Status: pulumi.String("{Enabled|Disabled}"),
TimeInMinutes: pulumi.Int(15),
WebhookUrl: pulumi.String("{webhookUrl}"),
},
ResourceGroupName: pulumi.String("resourceGroupName"),
Status: pulumi.String("{Enabled|Disabled}"),
Tags: pulumi.StringMap{
"tagName1": pulumi.String("tagValue1"),
},
TargetResourceId: pulumi.String("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}"),
TaskType: pulumi.String("{myLabVmTaskType}"),
TimeZoneId: pulumi.String("Pacific Standard Time"),
WeeklyRecurrence: &devtestlab.WeekDetailsArgs{
Time: pulumi.String("{timeOfTheDayTheScheduleWillOccurOnThoseDays}"),
Weekdays: pulumi.StringArray{
pulumi.String("Monday"),
pulumi.String("Wednesday"),
pulumi.String("Friday"),
},
},
})
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.devtestlab.Schedule;
import com.pulumi.azurenative.devtestlab.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()
.dailyRecurrence(Map.of("time", "{timeOfTheDayTheScheduleWillOccurEveryDay}"))
.hourlyRecurrence(Map.of("minute", 30))
.labName("{labName}")
.location("{location}")
.name("{scheduleName}")
.notificationSettings(Map.ofEntries(
Map.entry("emailRecipient", "{email}"),
Map.entry("notificationLocale", "EN"),
Map.entry("status", "{Enabled|Disabled}"),
Map.entry("timeInMinutes", 15),
Map.entry("webhookUrl", "{webhookUrl}")
))
.resourceGroupName("resourceGroupName")
.status("{Enabled|Disabled}")
.tags(Map.of("tagName1", "tagValue1"))
.targetResourceId("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}")
.taskType("{myLabVmTaskType}")
.timeZoneId("Pacific Standard Time")
.weeklyRecurrence(Map.ofEntries(
Map.entry("time", "{timeOfTheDayTheScheduleWillOccurOnThoseDays}"),
Map.entry("weekdays",
"Monday",
"Wednesday",
"Friday")
))
.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:devtestlab:Schedule {scheduleName} /subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/schedules/{scheduleName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(dailyRecurrence: Output<DayDetailsArgs>? = null, hourlyRecurrence: Output<HourDetailsArgs>? = null, labName: Output<String>? = 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
If the schedule will occur once each day of the week, specify the daily recurrence.
Link copied to clipboard
If the schedule will occur multiple times a day, specify the hourly recurrence.
Link copied to clipboard
Notification settings.
Link copied to clipboard
The name of the resource group.
Link copied to clipboard
The status of the schedule (i.e. Enabled, Disabled)
Link copied to clipboard
The resource ID to which the schedule belongs
Link copied to clipboard
The time zone ID (e.g. Pacific Standard time).
Link copied to clipboard
If the schedule will occur only some days of the week, specify the weekly recurrence.