ScheduleArgs

data class ScheduleArgs(val frequency: Output<Either<String, ScheduledFrequency>>? = null, val location: Output<String>? = null, val poolName: Output<String>? = null, val projectName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val scheduleName: Output<String>? = null, val state: Output<Either<String, ScheduleEnableStatus>>? = null, val tags: Output<Map<String, String>>? = null, val time: Output<String>? = null, val timeZone: Output<String>? = null, val top: Output<Int>? = null, val type: Output<Either<String, ScheduledType>>? = null) : ConvertibleToJava<ScheduleArgs>

Represents a Schedule to execute a task. Uses Azure REST API version 2024-02-01. In version 2.x of the Azure Native provider, it used API version 2023-04-01. Other available API versions: 2023-04-01, 2023-08-01-preview, 2023-10-01-preview, 2024-05-01-preview, 2024-06-01-preview, 2024-07-01-preview, 2024-08-01-preview, 2024-10-01-preview, 2025-02-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native devcenter [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Schedules_CreateDailyShutdownPoolSchedule

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var schedule = new AzureNative.DevCenter.Schedule("schedule", new()
{
Frequency = AzureNative.DevCenter.ScheduledFrequency.Daily,
PoolName = "DevPool",
ProjectName = "DevProject",
ResourceGroupName = "rg1",
ScheduleName = "autoShutdown",
State = AzureNative.DevCenter.ScheduleEnableStatus.Enabled,
Time = "17:30",
TimeZone = "America/Los_Angeles",
Type = AzureNative.DevCenter.ScheduledType.StopDevBox,
});
});
package main
import (
devcenter "github.com/pulumi/pulumi-azure-native-sdk/devcenter/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devcenter.NewSchedule(ctx, "schedule", &devcenter.ScheduleArgs{
Frequency: pulumi.String(devcenter.ScheduledFrequencyDaily),
PoolName: pulumi.String("DevPool"),
ProjectName: pulumi.String("DevProject"),
ResourceGroupName: pulumi.String("rg1"),
ScheduleName: pulumi.String("autoShutdown"),
State: pulumi.String(devcenter.ScheduleEnableStatusEnabled),
Time: pulumi.String("17:30"),
TimeZone: pulumi.String("America/Los_Angeles"),
Type: pulumi.String(devcenter.ScheduledTypeStopDevBox),
})
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.devcenter.Schedule;
import com.pulumi.azurenative.devcenter.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()
.frequency("Daily")
.poolName("DevPool")
.projectName("DevProject")
.resourceGroupName("rg1")
.scheduleName("autoShutdown")
.state("Enabled")
.time("17:30")
.timeZone("America/Los_Angeles")
.type("StopDevBox")
.build());
}
}

Import

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

$ pulumi import azure-native:devcenter:Schedule autoShutdown /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}

Constructors

Link copied to clipboard
constructor(frequency: Output<Either<String, ScheduledFrequency>>? = null, location: Output<String>? = null, poolName: Output<String>? = null, projectName: Output<String>? = null, resourceGroupName: Output<String>? = null, scheduleName: Output<String>? = null, state: Output<Either<String, ScheduleEnableStatus>>? = null, tags: Output<Map<String, String>>? = null, time: Output<String>? = null, timeZone: Output<String>? = null, top: Output<Int>? = null, type: Output<Either<String, ScheduledType>>? = null)

Properties

Link copied to clipboard
val frequency: Output<Either<String, ScheduledFrequency>>? = null

The frequency of this scheduled task.

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

The geo-location where the resource lives

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

Name of the pool.

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

The name of the project.

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.

Link copied to clipboard
val state: Output<Either<String, ScheduleEnableStatus>>? = null

Indicates whether or not this scheduled task is enabled.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

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

The target time to trigger the action. The format is HH:MM.

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

The IANA timezone id at which the schedule should execute.

Link copied to clipboard
val top: Output<Int>? = null

The maximum number of resources to return from the operation. Example: '$top=10'.

Link copied to clipboard
val type: Output<Either<String, ScheduledType>>? = null

Supported type this scheduled task represents.

Functions

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