Scaling Plan Personal Schedule Args
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
Properties
Set of days of the week on which this schedule is active.
Action to be taken after a user disconnect during the off-peak period.
Action to be taken after a logoff during the off-peak period.
The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak period.
The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak period.
Starting time for off-peak period.
The desired configuration of Start VM On Connect for the hostpool during the off-peak phase.
Action to be taken after a user disconnect during the peak period.
Action to be taken after a logoff during the peak period.
The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak period.
The time in minutes to wait before performing the desired session handling action when a user logs off during the peak period.
Starting time for peak period.
The desired configuration of Start VM On Connect for the hostpool during the peak phase.
Action to be taken after a user disconnect during the ramp down period.
Action to be taken after a logoff during the ramp down period.
The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp down period.
The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp down period.
Starting time for ramp down period.
The desired configuration of Start VM On Connect for the hostpool during the ramp down phase.
Action to be taken after a user disconnect during the ramp up period.
Action to be taken after a logoff during the ramp up period.
The desired startup behavior during the ramp up period for personal vms in the hostpool.
The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp up period.
The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp up period.
Starting time for ramp up period.
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.
The name of the resource group. The name is case insensitive.
The name of the scaling plan.
The name of the ScalingPlanSchedule