
com.pulumi.azurenative.desktopvirtualization.kotlin.ScalingPlanPersonalScheduleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.desktopvirtualization.kotlin
import com.pulumi.azurenative.desktopvirtualization.ScalingPlanPersonalScheduleArgs.builder
import com.pulumi.azurenative.desktopvirtualization.kotlin.enums.DayOfWeek
import com.pulumi.azurenative.desktopvirtualization.kotlin.enums.SessionHandlingOperation
import com.pulumi.azurenative.desktopvirtualization.kotlin.enums.SetStartVMOnConnect
import com.pulumi.azurenative.desktopvirtualization.kotlin.enums.StartupBehavior
import com.pulumi.azurenative.desktopvirtualization.kotlin.inputs.TimeArgs
import com.pulumi.azurenative.desktopvirtualization.kotlin.inputs.TimeArgsBuilder
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 com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Represents a ScalingPlanPersonalSchedule definition.
* Azure REST API version: 2023-07-07-preview.
* Other available API versions: 2023-09-05, 2023-10-04-preview, 2023-11-01-preview, 2024-01-16-preview, 2024-03-06-preview, 2024-04-03, 2024-04-08-preview.
* ## Example Usage
* ### ScalingPlanPersonalSchedules_Create
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var scalingPlanPersonalSchedule = new AzureNative.DesktopVirtualization.ScalingPlanPersonalSchedule("scalingPlanPersonalSchedule", new()
* {
* DaysOfWeek = new[]
* {
* AzureNative.DesktopVirtualization.DayOfWeek.Monday,
* AzureNative.DesktopVirtualization.DayOfWeek.Tuesday,
* AzureNative.DesktopVirtualization.DayOfWeek.Wednesday,
* AzureNative.DesktopVirtualization.DayOfWeek.Thursday,
* AzureNative.DesktopVirtualization.DayOfWeek.Friday,
* },
* OffPeakActionOnDisconnect = AzureNative.DesktopVirtualization.SessionHandlingOperation.None,
* OffPeakActionOnLogoff = AzureNative.DesktopVirtualization.SessionHandlingOperation.Deallocate,
* OffPeakMinutesToWaitOnDisconnect = 10,
* OffPeakMinutesToWaitOnLogoff = 10,
* OffPeakStartTime = new AzureNative.DesktopVirtualization.Inputs.TimeArgs
* {
* Hour = 20,
* Minute = 0,
* },
* OffPeakStartVMOnConnect = AzureNative.DesktopVirtualization.SetStartVMOnConnect.Enable,
* PeakActionOnDisconnect = AzureNative.DesktopVirtualization.SessionHandlingOperation.None,
* PeakActionOnLogoff = AzureNative.DesktopVirtualization.SessionHandlingOperation.Deallocate,
* PeakMinutesToWaitOnDisconnect = 10,
* PeakMinutesToWaitOnLogoff = 10,
* PeakStartTime = new AzureNative.DesktopVirtualization.Inputs.TimeArgs
* {
* Hour = 8,
* Minute = 0,
* },
* PeakStartVMOnConnect = AzureNative.DesktopVirtualization.SetStartVMOnConnect.Enable,
* RampDownActionOnDisconnect = AzureNative.DesktopVirtualization.SessionHandlingOperation.None,
* RampDownActionOnLogoff = AzureNative.DesktopVirtualization.SessionHandlingOperation.Deallocate,
* RampDownMinutesToWaitOnDisconnect = 10,
* RampDownMinutesToWaitOnLogoff = 10,
* RampDownStartTime = new AzureNative.DesktopVirtualization.Inputs.TimeArgs
* {
* Hour = 18,
* Minute = 0,
* },
* RampDownStartVMOnConnect = AzureNative.DesktopVirtualization.SetStartVMOnConnect.Enable,
* RampUpActionOnDisconnect = AzureNative.DesktopVirtualization.SessionHandlingOperation.None,
* RampUpActionOnLogoff = AzureNative.DesktopVirtualization.SessionHandlingOperation.None,
* RampUpAutoStartHosts = AzureNative.DesktopVirtualization.StartupBehavior.All,
* RampUpMinutesToWaitOnDisconnect = 10,
* RampUpMinutesToWaitOnLogoff = 10,
* RampUpStartTime = new AzureNative.DesktopVirtualization.Inputs.TimeArgs
* {
* Hour = 6,
* Minute = 0,
* },
* RampUpStartVMOnConnect = AzureNative.DesktopVirtualization.SetStartVMOnConnect.Enable,
* ResourceGroupName = "resourceGroup1",
* ScalingPlanName = "scalingPlan1",
* ScalingPlanScheduleName = "scalingPlanScheduleWeekdays1",
* });
* });
* ```
* ```go
* package main
* import (
* desktopvirtualization "github.com/pulumi/pulumi-azure-native-sdk/desktopvirtualization/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := desktopvirtualization.NewScalingPlanPersonalSchedule(ctx, "scalingPlanPersonalSchedule", &desktopvirtualization.ScalingPlanPersonalScheduleArgs{
* DaysOfWeek: pulumi.StringArray{
* pulumi.String(desktopvirtualization.DayOfWeekMonday),
* pulumi.String(desktopvirtualization.DayOfWeekTuesday),
* pulumi.String(desktopvirtualization.DayOfWeekWednesday),
* pulumi.String(desktopvirtualization.DayOfWeekThursday),
* pulumi.String(desktopvirtualization.DayOfWeekFriday),
* },
* OffPeakActionOnDisconnect: pulumi.String(desktopvirtualization.SessionHandlingOperationNone),
* OffPeakActionOnLogoff: pulumi.String(desktopvirtualization.SessionHandlingOperationDeallocate),
* OffPeakMinutesToWaitOnDisconnect: pulumi.Int(10),
* OffPeakMinutesToWaitOnLogoff: pulumi.Int(10),
* OffPeakStartTime: &desktopvirtualization.TimeArgs{
* Hour: pulumi.Int(20),
* Minute: pulumi.Int(0),
* },
* OffPeakStartVMOnConnect: pulumi.String(desktopvirtualization.SetStartVMOnConnectEnable),
* PeakActionOnDisconnect: pulumi.String(desktopvirtualization.SessionHandlingOperationNone),
* PeakActionOnLogoff: pulumi.String(desktopvirtualization.SessionHandlingOperationDeallocate),
* PeakMinutesToWaitOnDisconnect: pulumi.Int(10),
* PeakMinutesToWaitOnLogoff: pulumi.Int(10),
* PeakStartTime: &desktopvirtualization.TimeArgs{
* Hour: pulumi.Int(8),
* Minute: pulumi.Int(0),
* },
* PeakStartVMOnConnect: pulumi.String(desktopvirtualization.SetStartVMOnConnectEnable),
* RampDownActionOnDisconnect: pulumi.String(desktopvirtualization.SessionHandlingOperationNone),
* RampDownActionOnLogoff: pulumi.String(desktopvirtualization.SessionHandlingOperationDeallocate),
* RampDownMinutesToWaitOnDisconnect: pulumi.Int(10),
* RampDownMinutesToWaitOnLogoff: pulumi.Int(10),
* RampDownStartTime: &desktopvirtualization.TimeArgs{
* Hour: pulumi.Int(18),
* Minute: pulumi.Int(0),
* },
* RampDownStartVMOnConnect: pulumi.String(desktopvirtualization.SetStartVMOnConnectEnable),
* RampUpActionOnDisconnect: pulumi.String(desktopvirtualization.SessionHandlingOperationNone),
* RampUpActionOnLogoff: pulumi.String(desktopvirtualization.SessionHandlingOperationNone),
* RampUpAutoStartHosts: pulumi.String(desktopvirtualization.StartupBehaviorAll),
* RampUpMinutesToWaitOnDisconnect: pulumi.Int(10),
* RampUpMinutesToWaitOnLogoff: pulumi.Int(10),
* RampUpStartTime: &desktopvirtualization.TimeArgs{
* Hour: pulumi.Int(6),
* Minute: pulumi.Int(0),
* },
* RampUpStartVMOnConnect: pulumi.String(desktopvirtualization.SetStartVMOnConnectEnable),
* ResourceGroupName: pulumi.String("resourceGroup1"),
* ScalingPlanName: pulumi.String("scalingPlan1"),
* ScalingPlanScheduleName: pulumi.String("scalingPlanScheduleWeekdays1"),
* })
* 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.desktopvirtualization.ScalingPlanPersonalSchedule;
* import com.pulumi.azurenative.desktopvirtualization.ScalingPlanPersonalScheduleArgs;
* import com.pulumi.azurenative.desktopvirtualization.inputs.TimeArgs;
* 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 scalingPlanPersonalSchedule = new ScalingPlanPersonalSchedule("scalingPlanPersonalSchedule", ScalingPlanPersonalScheduleArgs.builder()
* .daysOfWeek(
* "Monday",
* "Tuesday",
* "Wednesday",
* "Thursday",
* "Friday")
* .offPeakActionOnDisconnect("None")
* .offPeakActionOnLogoff("Deallocate")
* .offPeakMinutesToWaitOnDisconnect(10)
* .offPeakMinutesToWaitOnLogoff(10)
* .offPeakStartTime(TimeArgs.builder()
* .hour(20)
* .minute(0)
* .build())
* .offPeakStartVMOnConnect("Enable")
* .peakActionOnDisconnect("None")
* .peakActionOnLogoff("Deallocate")
* .peakMinutesToWaitOnDisconnect(10)
* .peakMinutesToWaitOnLogoff(10)
* .peakStartTime(TimeArgs.builder()
* .hour(8)
* .minute(0)
* .build())
* .peakStartVMOnConnect("Enable")
* .rampDownActionOnDisconnect("None")
* .rampDownActionOnLogoff("Deallocate")
* .rampDownMinutesToWaitOnDisconnect(10)
* .rampDownMinutesToWaitOnLogoff(10)
* .rampDownStartTime(TimeArgs.builder()
* .hour(18)
* .minute(0)
* .build())
* .rampDownStartVMOnConnect("Enable")
* .rampUpActionOnDisconnect("None")
* .rampUpActionOnLogoff("None")
* .rampUpAutoStartHosts("All")
* .rampUpMinutesToWaitOnDisconnect(10)
* .rampUpMinutesToWaitOnLogoff(10)
* .rampUpStartTime(TimeArgs.builder()
* .hour(6)
* .minute(0)
* .build())
* .rampUpStartVMOnConnect("Enable")
* .resourceGroupName("resourceGroup1")
* .scalingPlanName("scalingPlan1")
* .scalingPlanScheduleName("scalingPlanScheduleWeekdays1")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:desktopvirtualization:ScalingPlanPersonalSchedule scalingPlanScheduleWeekdays1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}
* ```
* @property daysOfWeek Set of days of the week on which this schedule is active.
* @property offPeakActionOnDisconnect Action to be taken after a user disconnect during the off-peak period.
* @property offPeakActionOnLogoff Action to be taken after a logoff during the off-peak period.
* @property offPeakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak period.
* @property offPeakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak period.
* @property offPeakStartTime Starting time for off-peak period.
* @property offPeakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the off-peak phase.
* @property peakActionOnDisconnect Action to be taken after a user disconnect during the peak period.
* @property peakActionOnLogoff Action to be taken after a logoff during the peak period.
* @property peakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak period.
* @property peakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the peak period.
* @property peakStartTime Starting time for peak period.
* @property peakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the peak phase.
* @property rampDownActionOnDisconnect Action to be taken after a user disconnect during the ramp down period.
* @property rampDownActionOnLogoff Action to be taken after a logoff during the ramp down period.
* @property rampDownMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp down period.
* @property rampDownMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp down period.
* @property rampDownStartTime Starting time for ramp down period.
* @property rampDownStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the ramp down phase.
* @property rampUpActionOnDisconnect Action to be taken after a user disconnect during the ramp up period.
* @property rampUpActionOnLogoff Action to be taken after a logoff during the ramp up period.
* @property rampUpAutoStartHosts The desired startup behavior during the ramp up period for personal vms in the hostpool.
* @property rampUpMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp up period.
* @property rampUpMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp up period.
* @property rampUpStartTime Starting time for ramp up period.
* @property rampUpStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property scalingPlanName The name of the scaling plan.
* @property scalingPlanScheduleName The name of the ScalingPlanSchedule
*/
public data class ScalingPlanPersonalScheduleArgs(
public val daysOfWeek: Output>>? = null,
public val offPeakActionOnDisconnect: Output>? = null,
public val offPeakActionOnLogoff: Output>? = null,
public val offPeakMinutesToWaitOnDisconnect: Output? = null,
public val offPeakMinutesToWaitOnLogoff: Output? = null,
public val offPeakStartTime: Output? = null,
public val offPeakStartVMOnConnect: Output>? = null,
public val peakActionOnDisconnect: Output>? = null,
public val peakActionOnLogoff: Output>? = null,
public val peakMinutesToWaitOnDisconnect: Output? = null,
public val peakMinutesToWaitOnLogoff: Output? = null,
public val peakStartTime: Output? = null,
public val peakStartVMOnConnect: Output>? = null,
public val rampDownActionOnDisconnect: Output>? = null,
public val rampDownActionOnLogoff: Output>? = null,
public val rampDownMinutesToWaitOnDisconnect: Output? = null,
public val rampDownMinutesToWaitOnLogoff: Output? = null,
public val rampDownStartTime: Output? = null,
public val rampDownStartVMOnConnect: Output>? = null,
public val rampUpActionOnDisconnect: Output>? = null,
public val rampUpActionOnLogoff: Output>? = null,
public val rampUpAutoStartHosts: Output>? = null,
public val rampUpMinutesToWaitOnDisconnect: Output? = null,
public val rampUpMinutesToWaitOnLogoff: Output? = null,
public val rampUpStartTime: Output? = null,
public val rampUpStartVMOnConnect: Output>? = null,
public val resourceGroupName: Output? = null,
public val scalingPlanName: Output? = null,
public val scalingPlanScheduleName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.desktopvirtualization.ScalingPlanPersonalScheduleArgs =
com.pulumi.azurenative.desktopvirtualization.ScalingPlanPersonalScheduleArgs.builder()
.daysOfWeek(
daysOfWeek?.applyValue({ args0 ->
args0.map({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
})
}),
)
.offPeakActionOnDisconnect(
offPeakActionOnDisconnect?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.offPeakActionOnLogoff(
offPeakActionOnLogoff?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.offPeakMinutesToWaitOnDisconnect(offPeakMinutesToWaitOnDisconnect?.applyValue({ args0 -> args0 }))
.offPeakMinutesToWaitOnLogoff(offPeakMinutesToWaitOnLogoff?.applyValue({ args0 -> args0 }))
.offPeakStartTime(offPeakStartTime?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.offPeakStartVMOnConnect(
offPeakStartVMOnConnect?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.peakActionOnDisconnect(
peakActionOnDisconnect?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.peakActionOnLogoff(
peakActionOnLogoff?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.peakMinutesToWaitOnDisconnect(peakMinutesToWaitOnDisconnect?.applyValue({ args0 -> args0 }))
.peakMinutesToWaitOnLogoff(peakMinutesToWaitOnLogoff?.applyValue({ args0 -> args0 }))
.peakStartTime(peakStartTime?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.peakStartVMOnConnect(
peakStartVMOnConnect?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.rampDownActionOnDisconnect(
rampDownActionOnDisconnect?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.rampDownActionOnLogoff(
rampDownActionOnLogoff?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.rampDownMinutesToWaitOnDisconnect(
rampDownMinutesToWaitOnDisconnect?.applyValue({ args0 ->
args0
}),
)
.rampDownMinutesToWaitOnLogoff(rampDownMinutesToWaitOnLogoff?.applyValue({ args0 -> args0 }))
.rampDownStartTime(rampDownStartTime?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.rampDownStartVMOnConnect(
rampDownStartVMOnConnect?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.rampUpActionOnDisconnect(
rampUpActionOnDisconnect?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.rampUpActionOnLogoff(
rampUpActionOnLogoff?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.rampUpAutoStartHosts(
rampUpAutoStartHosts?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.rampUpMinutesToWaitOnDisconnect(rampUpMinutesToWaitOnDisconnect?.applyValue({ args0 -> args0 }))
.rampUpMinutesToWaitOnLogoff(rampUpMinutesToWaitOnLogoff?.applyValue({ args0 -> args0 }))
.rampUpStartTime(rampUpStartTime?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.rampUpStartVMOnConnect(
rampUpStartVMOnConnect?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.scalingPlanName(scalingPlanName?.applyValue({ args0 -> args0 }))
.scalingPlanScheduleName(scalingPlanScheduleName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ScalingPlanPersonalScheduleArgs].
*/
@PulumiTagMarker
public class ScalingPlanPersonalScheduleArgsBuilder internal constructor() {
private var daysOfWeek: Output>>? = null
private var offPeakActionOnDisconnect: Output>? = null
private var offPeakActionOnLogoff: Output>? = null
private var offPeakMinutesToWaitOnDisconnect: Output? = null
private var offPeakMinutesToWaitOnLogoff: Output? = null
private var offPeakStartTime: Output? = null
private var offPeakStartVMOnConnect: Output>? = null
private var peakActionOnDisconnect: Output>? = null
private var peakActionOnLogoff: Output>? = null
private var peakMinutesToWaitOnDisconnect: Output? = null
private var peakMinutesToWaitOnLogoff: Output? = null
private var peakStartTime: Output? = null
private var peakStartVMOnConnect: Output>? = null
private var rampDownActionOnDisconnect: Output>? = null
private var rampDownActionOnLogoff: Output>? = null
private var rampDownMinutesToWaitOnDisconnect: Output? = null
private var rampDownMinutesToWaitOnLogoff: Output? = null
private var rampDownStartTime: Output? = null
private var rampDownStartVMOnConnect: Output>? = null
private var rampUpActionOnDisconnect: Output>? = null
private var rampUpActionOnLogoff: Output>? = null
private var rampUpAutoStartHosts: Output>? = null
private var rampUpMinutesToWaitOnDisconnect: Output? = null
private var rampUpMinutesToWaitOnLogoff: Output? = null
private var rampUpStartTime: Output? = null
private var rampUpStartVMOnConnect: Output>? = null
private var resourceGroupName: Output? = null
private var scalingPlanName: Output? = null
private var scalingPlanScheduleName: Output? = null
/**
* @param value Set of days of the week on which this schedule is active.
*/
@JvmName("fmaqljblwqdguvvd")
public suspend fun daysOfWeek(`value`: Output>>) {
this.daysOfWeek = value
}
@JvmName("tqxbuxldrsayuoxw")
public suspend fun daysOfWeek(vararg values: Output>) {
this.daysOfWeek = Output.all(values.asList())
}
/**
* @param values Set of days of the week on which this schedule is active.
*/
@JvmName("vosgmmyswcnypunr")
public suspend fun daysOfWeek(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy