ScalingPlanPersonalScheduleArgs

data class ScalingPlanPersonalScheduleArgs(val daysOfWeek: Output<List<Either<String, DayOfWeek>>>? = null, val offPeakActionOnDisconnect: Output<Either<String, SessionHandlingOperation>>? = null, val offPeakActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null, val offPeakMinutesToWaitOnDisconnect: Output<Int>? = null, val offPeakMinutesToWaitOnLogoff: Output<Int>? = null, val offPeakStartTime: Output<TimeArgs>? = null, val offPeakStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null, val peakActionOnDisconnect: Output<Either<String, SessionHandlingOperation>>? = null, val peakActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null, val peakMinutesToWaitOnDisconnect: Output<Int>? = null, val peakMinutesToWaitOnLogoff: Output<Int>? = null, val peakStartTime: Output<TimeArgs>? = null, val peakStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null, val rampDownActionOnDisconnect: Output<Either<String, SessionHandlingOperation>>? = null, val rampDownActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null, val rampDownMinutesToWaitOnDisconnect: Output<Int>? = null, val rampDownMinutesToWaitOnLogoff: Output<Int>? = null, val rampDownStartTime: Output<TimeArgs>? = null, val rampDownStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null, val rampUpActionOnDisconnect: Output<Either<String, SessionHandlingOperation>>? = null, val rampUpActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null, val rampUpAutoStartHosts: Output<Either<String, StartupBehavior>>? = null, val rampUpMinutesToWaitOnDisconnect: Output<Int>? = null, val rampUpMinutesToWaitOnLogoff: Output<Int>? = null, val rampUpStartTime: Output<TimeArgs>? = null, val rampUpStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null, val resourceGroupName: Output<String>? = null, val scalingPlanName: Output<String>? = null, val scalingPlanScheduleName: Output<String>? = null) : ConvertibleToJava<ScalingPlanPersonalScheduleArgs>

Represents a ScalingPlanPersonalSchedule definition. Uses Azure REST API version 2024-04-03. In version 2.x of the Azure Native provider, it used API version 2024-11-01-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-08-preview, 2024-08-08-preview, 2024-11-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native desktopvirtualization [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

ScalingPlanPersonalSchedules_Create

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",
});
});
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
})
}
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.

$ pulumi import azure-native:desktopvirtualization:ScalingPlanPersonalSchedule scalingPlanScheduleWeekdays1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}

Constructors

Link copied to clipboard
constructor(daysOfWeek: Output<List<Either<String, DayOfWeek>>>? = null, offPeakActionOnDisconnect: Output<Either<String, SessionHandlingOperation>>? = null, offPeakActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null, offPeakMinutesToWaitOnDisconnect: Output<Int>? = null, offPeakMinutesToWaitOnLogoff: Output<Int>? = null, offPeakStartTime: Output<TimeArgs>? = null, offPeakStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null, peakActionOnDisconnect: Output<Either<String, SessionHandlingOperation>>? = null, peakActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null, peakMinutesToWaitOnDisconnect: Output<Int>? = null, peakMinutesToWaitOnLogoff: Output<Int>? = null, peakStartTime: Output<TimeArgs>? = null, peakStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null, rampDownActionOnDisconnect: Output<Either<String, SessionHandlingOperation>>? = null, rampDownActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null, rampDownMinutesToWaitOnDisconnect: Output<Int>? = null, rampDownMinutesToWaitOnLogoff: Output<Int>? = null, rampDownStartTime: Output<TimeArgs>? = null, rampDownStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null, rampUpActionOnDisconnect: Output<Either<String, SessionHandlingOperation>>? = null, rampUpActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null, rampUpAutoStartHosts: Output<Either<String, StartupBehavior>>? = null, rampUpMinutesToWaitOnDisconnect: Output<Int>? = null, rampUpMinutesToWaitOnLogoff: Output<Int>? = null, rampUpStartTime: Output<TimeArgs>? = null, rampUpStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null, resourceGroupName: Output<String>? = null, scalingPlanName: Output<String>? = null, scalingPlanScheduleName: Output<String>? = null)

Properties

Link copied to clipboard
val daysOfWeek: Output<List<Either<String, DayOfWeek>>>? = null

Set of days of the week on which this schedule is active.

Link copied to clipboard

Action to be taken after a user disconnect during the off-peak period.

Link copied to clipboard

Action to be taken after a logoff during the off-peak period.

Link copied to clipboard

The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak period.

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

The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak period.

Link copied to clipboard
val offPeakStartTime: Output<TimeArgs>? = null

Starting time for off-peak period.

Link copied to clipboard
val offPeakStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null

The desired configuration of Start VM On Connect for the hostpool during the off-peak phase.

Link copied to clipboard

Action to be taken after a user disconnect during the peak period.

Link copied to clipboard
val peakActionOnLogoff: Output<Either<String, SessionHandlingOperation>>? = null

Action to be taken after a logoff during the peak period.

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

The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak period.

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

The time in minutes to wait before performing the desired session handling action when a user logs off during the peak period.

Link copied to clipboard
val peakStartTime: Output<TimeArgs>? = null

Starting time for peak period.

Link copied to clipboard
val peakStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null

The desired configuration of Start VM On Connect for the hostpool during the peak phase.

Link copied to clipboard

Action to be taken after a user disconnect during the ramp down period.

Link copied to clipboard

Action to be taken after a logoff during the ramp down period.

Link copied to clipboard

The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp down period.

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

The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp down period.

Link copied to clipboard
val rampDownStartTime: Output<TimeArgs>? = null

Starting time for ramp down period.

Link copied to clipboard

The desired configuration of Start VM On Connect for the hostpool during the ramp down phase.

Link copied to clipboard

Action to be taken after a user disconnect during the ramp up period.

Link copied to clipboard

Action to be taken after a logoff during the ramp up period.

Link copied to clipboard
val rampUpAutoStartHosts: Output<Either<String, StartupBehavior>>? = null

The desired startup behavior during the ramp up period for personal vms in the hostpool.

Link copied to clipboard

The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp up period.

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

The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp up period.

Link copied to clipboard
val rampUpStartTime: Output<TimeArgs>? = null

Starting time for ramp up period.

Link copied to clipboard
val rampUpStartVMOnConnect: Output<Either<String, SetStartVMOnConnect>>? = null

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.

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 scalingPlanName: Output<String>? = null

The name of the scaling plan.

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

The name of the ScalingPlanSchedule

Functions

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