![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.devtest.kotlin.ScheduleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.devtest.kotlin
import com.pulumi.azure.devtest.ScheduleArgs.builder
import com.pulumi.azure.devtest.kotlin.inputs.ScheduleDailyRecurrenceArgs
import com.pulumi.azure.devtest.kotlin.inputs.ScheduleDailyRecurrenceArgsBuilder
import com.pulumi.azure.devtest.kotlin.inputs.ScheduleHourlyRecurrenceArgs
import com.pulumi.azure.devtest.kotlin.inputs.ScheduleHourlyRecurrenceArgsBuilder
import com.pulumi.azure.devtest.kotlin.inputs.ScheduleNotificationSettingsArgs
import com.pulumi.azure.devtest.kotlin.inputs.ScheduleNotificationSettingsArgsBuilder
import com.pulumi.azure.devtest.kotlin.inputs.ScheduleWeeklyRecurrenceArgs
import com.pulumi.azure.devtest.kotlin.inputs.ScheduleWeeklyRecurrenceArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages automated startup and shutdown schedules for Azure Dev Test Lab.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleLab = new azure.devtest.Lab("example", {
* name: "YourDevTestLab",
* location: example.location,
* resourceGroupName: example.name,
* });
* const exampleSchedule = new azure.devtest.Schedule("example", {
* name: "LabVmAutoStart",
* location: example.location,
* resourceGroupName: example.name,
* labName: exampleLab.name,
* status: "Enabled",
* weeklyRecurrence: {
* time: "1100",
* weekDays: [
* "Monday",
* "Tuesday",
* ],
* },
* timeZoneId: "Pacific Standard Time",
* taskType: "LabVmsStartupTask",
* notificationSettings: {},
* tags: {
* environment: "Production",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_lab = azure.devtest.Lab("example",
* name="YourDevTestLab",
* location=example.location,
* resource_group_name=example.name)
* example_schedule = azure.devtest.Schedule("example",
* name="LabVmAutoStart",
* location=example.location,
* resource_group_name=example.name,
* lab_name=example_lab.name,
* status="Enabled",
* weekly_recurrence={
* "time": "1100",
* "week_days": [
* "Monday",
* "Tuesday",
* ],
* },
* time_zone_id="Pacific Standard Time",
* task_type="LabVmsStartupTask",
* notification_settings={},
* tags={
* "environment": "Production",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleLab = new Azure.DevTest.Lab("example", new()
* {
* Name = "YourDevTestLab",
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* var exampleSchedule = new Azure.DevTest.Schedule("example", new()
* {
* Name = "LabVmAutoStart",
* Location = example.Location,
* ResourceGroupName = example.Name,
* LabName = exampleLab.Name,
* Status = "Enabled",
* WeeklyRecurrence = new Azure.DevTest.Inputs.ScheduleWeeklyRecurrenceArgs
* {
* Time = "1100",
* WeekDays = new[]
* {
* "Monday",
* "Tuesday",
* },
* },
* TimeZoneId = "Pacific Standard Time",
* TaskType = "LabVmsStartupTask",
* NotificationSettings = null,
* Tags =
* {
* { "environment", "Production" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/devtest"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleLab, err := devtest.NewLab(ctx, "example", &devtest.LabArgs{
* Name: pulumi.String("YourDevTestLab"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* if err != nil {
* return err
* }
* _, err = devtest.NewSchedule(ctx, "example", &devtest.ScheduleArgs{
* Name: pulumi.String("LabVmAutoStart"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* LabName: exampleLab.Name,
* Status: pulumi.String("Enabled"),
* WeeklyRecurrence: &devtest.ScheduleWeeklyRecurrenceArgs{
* Time: pulumi.String("1100"),
* WeekDays: pulumi.StringArray{
* pulumi.String("Monday"),
* pulumi.String("Tuesday"),
* },
* },
* TimeZoneId: pulumi.String("Pacific Standard Time"),
* TaskType: pulumi.String("LabVmsStartupTask"),
* NotificationSettings: nil,
* Tags: pulumi.StringMap{
* "environment": pulumi.String("Production"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleLab = new Lab("exampleLab", LabArgs.builder()
* .name("YourDevTestLab")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* var exampleSchedule = new Schedule("exampleSchedule", ScheduleArgs.builder()
* .name("LabVmAutoStart")
* .location(example.location())
* .resourceGroupName(example.name())
* .labName(exampleLab.name())
* .status("Enabled")
* .weeklyRecurrence(ScheduleWeeklyRecurrenceArgs.builder()
* .time("1100")
* .weekDays(
* "Monday",
* "Tuesday")
* .build())
* .timeZoneId("Pacific Standard Time")
* .taskType("LabVmsStartupTask")
* .notificationSettings()
* .tags(Map.of("environment", "Production"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleLab:
* type: azure:devtest:Lab
* name: example
* properties:
* name: YourDevTestLab
* location: ${example.location}
* resourceGroupName: ${example.name}
* exampleSchedule:
* type: azure:devtest:Schedule
* name: example
* properties:
* name: LabVmAutoStart
* location: ${example.location}
* resourceGroupName: ${example.name}
* labName: ${exampleLab.name}
* status: Enabled
* weeklyRecurrence:
* time: '1100'
* weekDays:
* - Monday
* - Tuesday
* timeZoneId: Pacific Standard Time
* taskType: LabVmsStartupTask
* notificationSettings: {}
* tags:
* environment: Production
* ```
*
* ## Import
* DevTest Schedule's can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:devtest/schedule:Schedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DevTestLab/labs/myDevTestLab/schedules/labvmautostart
* ```
* @property dailyRecurrence 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.
* @property hourlyRecurrence 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.
* @property labName The name of the dev test lab. Changing this forces a new resource to be created.
* @property location The location where the schedule is created. Changing this forces a new resource to be created.
* @property name 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.
* @property notificationSettings The notification setting of a schedule. A `notification_settings` block as defined below.
* @property resourceGroupName The name of the resource group in which to create the dev test lab schedule. Changing this forces a new resource to be created.
* @property status The status of this schedule. Possible values are `Enabled` and `Disabled`. Defaults to `Disabled`.
* @property tags A mapping of tags to assign to the resource.
* @property taskType The task type of the schedule. Possible values include `LabVmsShutdownTask` and `LabVmAutoStart`.
* @property timeZoneId The time zone ID (e.g. Pacific Standard time).
* @property weeklyRecurrence 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.
*/
public data class ScheduleArgs(
public val dailyRecurrence: Output? = null,
public val hourlyRecurrence: Output? = null,
public val labName: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val notificationSettings: Output? = null,
public val resourceGroupName: Output? = null,
public val status: Output? = null,
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy