Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.devcenter.kotlin
import com.pulumi.azurenative.devcenter.ScheduleArgs.builder
import com.pulumi.azurenative.devcenter.kotlin.enums.ScheduleEnableStatus
import com.pulumi.azurenative.devcenter.kotlin.enums.ScheduledFrequency
import com.pulumi.azurenative.devcenter.kotlin.enums.ScheduledType
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Represents a Schedule to execute a task.
* Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2022-09-01-preview.
* Other available API versions: 2023-08-01-preview, 2023-10-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview, 2024-07-01-preview, 2024-08-01-preview.
* ## Example Usage
* ### Schedules_CreateDailyShutdownPoolSchedule
* ```csharp
* 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,
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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.
* ```sh
* $ pulumi import azure-native:devcenter:Schedule autoShutdown /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}
* ```
* @property frequency The frequency of this scheduled task.
* @property poolName Name of the pool.
* @property projectName The name of the project.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property scheduleName The name of the schedule that uniquely identifies it.
* @property state Indicates whether or not this scheduled task is enabled.
* @property time The target time to trigger the action. The format is HH:MM.
* @property timeZone The IANA timezone id at which the schedule should execute.
* @property top The maximum number of resources to return from the operation. Example: '$top=10'.
* @property type Supported type this scheduled task represents.
*/
public data class ScheduleArgs(
public val frequency: Output>? = null,
public val poolName: Output? = null,
public val projectName: Output? = null,
public val resourceGroupName: Output? = null,
public val scheduleName: Output? = null,
public val state: Output>? = null,
public val time: Output? = null,
public val timeZone: Output? = null,
public val top: Output? = null,
public val type: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.devcenter.ScheduleArgs =
com.pulumi.azurenative.devcenter.ScheduleArgs.builder()
.frequency(
frequency?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.poolName(poolName?.applyValue({ args0 -> args0 }))
.projectName(projectName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.scheduleName(scheduleName?.applyValue({ args0 -> args0 }))
.state(
state?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.time(time?.applyValue({ args0 -> args0 }))
.timeZone(timeZone?.applyValue({ args0 -> args0 }))
.top(top?.applyValue({ args0 -> args0 }))
.type(
type?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [ScheduleArgs].
*/
@PulumiTagMarker
public class ScheduleArgsBuilder internal constructor() {
private var frequency: Output>? = null
private var poolName: Output? = null
private var projectName: Output? = null
private var resourceGroupName: Output? = null
private var scheduleName: Output? = null
private var state: Output>? = null
private var time: Output? = null
private var timeZone: Output? = null
private var top: Output? = null
private var type: Output>? = null
/**
* @param value The frequency of this scheduled task.
*/
@JvmName("bfpyvoxxvjbwmqpp")
public suspend fun frequency(`value`: Output>) {
this.frequency = value
}
/**
* @param value Name of the pool.
*/
@JvmName("moiwlexomtiaywuy")
public suspend fun poolName(`value`: Output) {
this.poolName = value
}
/**
* @param value The name of the project.
*/
@JvmName("cyqoftaivpxyehtg")
public suspend fun projectName(`value`: Output) {
this.projectName = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("qbecbdhworeroclg")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the schedule that uniquely identifies it.
*/
@JvmName("hkomvuvqxjlmeitp")
public suspend fun scheduleName(`value`: Output) {
this.scheduleName = value
}
/**
* @param value Indicates whether or not this scheduled task is enabled.
*/
@JvmName("vcjfvwjplywlulka")
public suspend fun state(`value`: Output>) {
this.state = value
}
/**
* @param value The target time to trigger the action. The format is HH:MM.
*/
@JvmName("hwnmcginnareycpq")
public suspend fun time(`value`: Output) {
this.time = value
}
/**
* @param value The IANA timezone id at which the schedule should execute.
*/
@JvmName("vdfqbeeqvyktdakw")
public suspend fun timeZone(`value`: Output) {
this.timeZone = value
}
/**
* @param value The maximum number of resources to return from the operation. Example: '$top=10'.
*/
@JvmName("axqebthwnbaafxeu")
public suspend fun top(`value`: Output) {
this.top = value
}
/**
* @param value Supported type this scheduled task represents.
*/
@JvmName("siqmffeibpllncel")
public suspend fun type(`value`: Output>) {
this.type = value
}
/**
* @param value The frequency of this scheduled task.
*/
@JvmName("qdynhutvhmaroxsx")
public suspend fun frequency(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frequency = mapped
}
/**
* @param value The frequency of this scheduled task.
*/
@JvmName("vckigwjmeoivwqni")
public fun frequency(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.frequency = mapped
}
/**
* @param value The frequency of this scheduled task.
*/
@JvmName("fetsdlqrmhsjrmyp")
public fun frequency(`value`: ScheduledFrequency) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.frequency = mapped
}
/**
* @param value Name of the pool.
*/
@JvmName("kqepsxmheagytgph")
public suspend fun poolName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.poolName = mapped
}
/**
* @param value The name of the project.
*/
@JvmName("timpoigarlyonpjj")
public suspend fun projectName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.projectName = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("bigdpxdrwiodvvwa")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name of the schedule that uniquely identifies it.
*/
@JvmName("tgsyhcxcbvwkmvqt")
public suspend fun scheduleName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.scheduleName = mapped
}
/**
* @param value Indicates whether or not this scheduled task is enabled.
*/
@JvmName("lwnybsksqmyrkdew")
public suspend fun state(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value Indicates whether or not this scheduled task is enabled.
*/
@JvmName("gfnepmmfwgxhvrfl")
public fun state(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value Indicates whether or not this scheduled task is enabled.
*/
@JvmName("xqrbusvhjbjmvnqj")
public fun state(`value`: ScheduleEnableStatus) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value The target time to trigger the action. The format is HH:MM.
*/
@JvmName("penmifghbfwktgsc")
public suspend fun time(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.time = mapped
}
/**
* @param value The IANA timezone id at which the schedule should execute.
*/
@JvmName("mokqhbymrqipjldh")
public suspend fun timeZone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeZone = mapped
}
/**
* @param value The maximum number of resources to return from the operation. Example: '$top=10'.
*/
@JvmName("ehykugtwqycniwqs")
public suspend fun top(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.top = mapped
}
/**
* @param value Supported type this scheduled task represents.
*/
@JvmName("htudtgrrksahvwtn")
public suspend fun type(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
/**
* @param value Supported type this scheduled task represents.
*/
@JvmName("otsruxdelgwhtoyw")
public fun type(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.type = mapped
}
/**
* @param value Supported type this scheduled task represents.
*/
@JvmName("rgptytnwsnasfvny")
public fun type(`value`: ScheduledType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): ScheduleArgs = ScheduleArgs(
frequency = frequency,
poolName = poolName,
projectName = projectName,
resourceGroupName = resourceGroupName,
scheduleName = scheduleName,
state = state,
time = time,
timeZone = timeZone,
top = top,
type = type,
)
}