1. Packages
  2. Azure Classic
  3. API Docs
  4. desktopvirtualization
  5. ScalingPlan

We recommend using Azure Native.

Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi

azure.desktopvirtualization.ScalingPlan

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi

    Manages a Virtual Desktop Scaling Plan.

    Disclaimers

    Note Scaling Plans are currently in preview and are only supported in a limited number of regions. Both the Scaling Plan and any referenced Host Pools must be deployed in a supported region. Autoscale (preview) for Azure Virtual Desktop host pools.

    Note Scaling Plans require specific permissions to be granted to the Windows Virtual Desktop application before a ‘host_pool’ can be configured. Required Permissions for Scaling Plans.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using AzureAD = Pulumi.AzureAD;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleRandomUuid = new Random.RandomUuid("exampleRandomUuid");
    
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleRoleDefinition = new Azure.Authorization.RoleDefinition("exampleRoleDefinition", new()
        {
            Scope = exampleResourceGroup.Id,
            Description = "AVD AutoScale Role",
            Permissions = new[]
            {
                new Azure.Authorization.Inputs.RoleDefinitionPermissionArgs
                {
                    Actions = new[]
                    {
                        "Microsoft.Insights/eventtypes/values/read",
                        "Microsoft.Compute/virtualMachines/deallocate/action",
                        "Microsoft.Compute/virtualMachines/restart/action",
                        "Microsoft.Compute/virtualMachines/powerOff/action",
                        "Microsoft.Compute/virtualMachines/start/action",
                        "Microsoft.Compute/virtualMachines/read",
                        "Microsoft.DesktopVirtualization/hostpools/read",
                        "Microsoft.DesktopVirtualization/hostpools/write",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/read",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/write",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/delete",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/sendMessage/action",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read",
                    },
                    NotActions = new() { },
                },
            },
            AssignableScopes = new[]
            {
                exampleResourceGroup.Id,
            },
        });
    
        var exampleServicePrincipal = AzureAD.GetServicePrincipal.Invoke(new()
        {
            DisplayName = "Windows Virtual Desktop",
        });
    
        var exampleAssignment = new Azure.Authorization.Assignment("exampleAssignment", new()
        {
            Name = exampleRandomUuid.Result,
            Scope = exampleResourceGroup.Id,
            RoleDefinitionId = exampleRoleDefinition.RoleDefinitionResourceId,
            PrincipalId = exampleServicePrincipal.Apply(getServicePrincipalResult => getServicePrincipalResult.Id),
            SkipServicePrincipalAadCheck = true,
        });
    
        var exampleHostPool = new Azure.DesktopVirtualization.HostPool("exampleHostPool", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Type = "Pooled",
            ValidateEnvironment = true,
            LoadBalancerType = "BreadthFirst",
        });
    
        var exampleScalingPlan = new Azure.DesktopVirtualization.ScalingPlan("exampleScalingPlan", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            FriendlyName = "Scaling Plan Example",
            Description = "Example Scaling Plan",
            TimeZone = "GMT Standard Time",
            Schedules = new[]
            {
                new Azure.DesktopVirtualization.Inputs.ScalingPlanScheduleArgs
                {
                    Name = "Weekdays",
                    DaysOfWeeks = new[]
                    {
                        "Monday",
                        "Tuesday",
                        "Wednesday",
                        "Thursday",
                        "Friday",
                    },
                    RampUpStartTime = "05:00",
                    RampUpLoadBalancingAlgorithm = "BreadthFirst",
                    RampUpMinimumHostsPercent = 20,
                    RampUpCapacityThresholdPercent = 10,
                    PeakStartTime = "09:00",
                    PeakLoadBalancingAlgorithm = "BreadthFirst",
                    RampDownStartTime = "19:00",
                    RampDownLoadBalancingAlgorithm = "DepthFirst",
                    RampDownMinimumHostsPercent = 10,
                    RampDownForceLogoffUsers = false,
                    RampDownWaitTimeMinutes = 45,
                    RampDownNotificationMessage = "Please log off in the next 45 minutes...",
                    RampDownCapacityThresholdPercent = 5,
                    RampDownStopHostsWhen = "ZeroSessions",
                    OffPeakStartTime = "22:00",
                    OffPeakLoadBalancingAlgorithm = "DepthFirst",
                },
            },
            HostPools = new[]
            {
                new Azure.DesktopVirtualization.Inputs.ScalingPlanHostPoolArgs
                {
                    HostpoolId = exampleHostPool.Id,
                    ScalingPlanEnabled = true,
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/desktopvirtualization"
    	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleRandomUuid, err := random.NewRandomUuid(ctx, "exampleRandomUuid", nil)
    		if err != nil {
    			return err
    		}
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleRoleDefinition, err := authorization.NewRoleDefinition(ctx, "exampleRoleDefinition", &authorization.RoleDefinitionArgs{
    			Scope:       exampleResourceGroup.ID(),
    			Description: pulumi.String("AVD AutoScale Role"),
    			Permissions: authorization.RoleDefinitionPermissionArray{
    				&authorization.RoleDefinitionPermissionArgs{
    					Actions: pulumi.StringArray{
    						pulumi.String("Microsoft.Insights/eventtypes/values/read"),
    						pulumi.String("Microsoft.Compute/virtualMachines/deallocate/action"),
    						pulumi.String("Microsoft.Compute/virtualMachines/restart/action"),
    						pulumi.String("Microsoft.Compute/virtualMachines/powerOff/action"),
    						pulumi.String("Microsoft.Compute/virtualMachines/start/action"),
    						pulumi.String("Microsoft.Compute/virtualMachines/read"),
    						pulumi.String("Microsoft.DesktopVirtualization/hostpools/read"),
    						pulumi.String("Microsoft.DesktopVirtualization/hostpools/write"),
    						pulumi.String("Microsoft.DesktopVirtualization/hostpools/sessionhosts/read"),
    						pulumi.String("Microsoft.DesktopVirtualization/hostpools/sessionhosts/write"),
    						pulumi.String("Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/delete"),
    						pulumi.String("Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read"),
    						pulumi.String("Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/sendMessage/action"),
    						pulumi.String("Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read"),
    					},
    					NotActions: pulumi.StringArray{},
    				},
    			},
    			AssignableScopes: pulumi.StringArray{
    				exampleResourceGroup.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleServicePrincipal, err := azuread.LookupServicePrincipal(ctx, &azuread.LookupServicePrincipalArgs{
    			DisplayName: pulumi.StringRef("Windows Virtual Desktop"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = authorization.NewAssignment(ctx, "exampleAssignment", &authorization.AssignmentArgs{
    			Name:                         exampleRandomUuid.Result,
    			Scope:                        exampleResourceGroup.ID(),
    			RoleDefinitionId:             exampleRoleDefinition.RoleDefinitionResourceId,
    			PrincipalId:                  *pulumi.String(exampleServicePrincipal.Id),
    			SkipServicePrincipalAadCheck: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		exampleHostPool, err := desktopvirtualization.NewHostPool(ctx, "exampleHostPool", &desktopvirtualization.HostPoolArgs{
    			Location:            exampleResourceGroup.Location,
    			ResourceGroupName:   exampleResourceGroup.Name,
    			Type:                pulumi.String("Pooled"),
    			ValidateEnvironment: pulumi.Bool(true),
    			LoadBalancerType:    pulumi.String("BreadthFirst"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = desktopvirtualization.NewScalingPlan(ctx, "exampleScalingPlan", &desktopvirtualization.ScalingPlanArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			FriendlyName:      pulumi.String("Scaling Plan Example"),
    			Description:       pulumi.String("Example Scaling Plan"),
    			TimeZone:          pulumi.String("GMT Standard Time"),
    			Schedules: desktopvirtualization.ScalingPlanScheduleArray{
    				&desktopvirtualization.ScalingPlanScheduleArgs{
    					Name: pulumi.String("Weekdays"),
    					DaysOfWeeks: pulumi.StringArray{
    						pulumi.String("Monday"),
    						pulumi.String("Tuesday"),
    						pulumi.String("Wednesday"),
    						pulumi.String("Thursday"),
    						pulumi.String("Friday"),
    					},
    					RampUpStartTime:                  pulumi.String("05:00"),
    					RampUpLoadBalancingAlgorithm:     pulumi.String("BreadthFirst"),
    					RampUpMinimumHostsPercent:        pulumi.Int(20),
    					RampUpCapacityThresholdPercent:   pulumi.Int(10),
    					PeakStartTime:                    pulumi.String("09:00"),
    					PeakLoadBalancingAlgorithm:       pulumi.String("BreadthFirst"),
    					RampDownStartTime:                pulumi.String("19:00"),
    					RampDownLoadBalancingAlgorithm:   pulumi.String("DepthFirst"),
    					RampDownMinimumHostsPercent:      pulumi.Int(10),
    					RampDownForceLogoffUsers:         pulumi.Bool(false),
    					RampDownWaitTimeMinutes:          pulumi.Int(45),
    					RampDownNotificationMessage:      pulumi.String("Please log off in the next 45 minutes..."),
    					RampDownCapacityThresholdPercent: pulumi.Int(5),
    					RampDownStopHostsWhen:            pulumi.String("ZeroSessions"),
    					OffPeakStartTime:                 pulumi.String("22:00"),
    					OffPeakLoadBalancingAlgorithm:    pulumi.String("DepthFirst"),
    				},
    			},
    			HostPools: desktopvirtualization.ScalingPlanHostPoolArray{
    				&desktopvirtualization.ScalingPlanHostPoolArgs{
    					HostpoolId:         exampleHostPool.ID(),
    					ScalingPlanEnabled: pulumi.Bool(true),
    				},
    			},
    		})
    		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.random.RandomUuid;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.authorization.RoleDefinition;
    import com.pulumi.azure.authorization.RoleDefinitionArgs;
    import com.pulumi.azure.authorization.inputs.RoleDefinitionPermissionArgs;
    import com.pulumi.azuread.AzureadFunctions;
    import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
    import com.pulumi.azure.authorization.Assignment;
    import com.pulumi.azure.authorization.AssignmentArgs;
    import com.pulumi.azure.desktopvirtualization.HostPool;
    import com.pulumi.azure.desktopvirtualization.HostPoolArgs;
    import com.pulumi.azure.desktopvirtualization.ScalingPlan;
    import com.pulumi.azure.desktopvirtualization.ScalingPlanArgs;
    import com.pulumi.azure.desktopvirtualization.inputs.ScalingPlanScheduleArgs;
    import com.pulumi.azure.desktopvirtualization.inputs.ScalingPlanHostPoolArgs;
    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 exampleRandomUuid = new RandomUuid("exampleRandomUuid");
    
            var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleRoleDefinition = new RoleDefinition("exampleRoleDefinition", RoleDefinitionArgs.builder()        
                .scope(exampleResourceGroup.id())
                .description("AVD AutoScale Role")
                .permissions(RoleDefinitionPermissionArgs.builder()
                    .actions(                
                        "Microsoft.Insights/eventtypes/values/read",
                        "Microsoft.Compute/virtualMachines/deallocate/action",
                        "Microsoft.Compute/virtualMachines/restart/action",
                        "Microsoft.Compute/virtualMachines/powerOff/action",
                        "Microsoft.Compute/virtualMachines/start/action",
                        "Microsoft.Compute/virtualMachines/read",
                        "Microsoft.DesktopVirtualization/hostpools/read",
                        "Microsoft.DesktopVirtualization/hostpools/write",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/read",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/write",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/delete",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/sendMessage/action",
                        "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read")
                    .notActions()
                    .build())
                .assignableScopes(exampleResourceGroup.id())
                .build());
    
            final var exampleServicePrincipal = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
                .displayName("Windows Virtual Desktop")
                .build());
    
            var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()        
                .name(exampleRandomUuid.result())
                .scope(exampleResourceGroup.id())
                .roleDefinitionId(exampleRoleDefinition.roleDefinitionResourceId())
                .principalId(exampleServicePrincipal.applyValue(getServicePrincipalResult -> getServicePrincipalResult.id()))
                .skipServicePrincipalAadCheck(true)
                .build());
    
            var exampleHostPool = new HostPool("exampleHostPool", HostPoolArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .type("Pooled")
                .validateEnvironment(true)
                .loadBalancerType("BreadthFirst")
                .build());
    
            var exampleScalingPlan = new ScalingPlan("exampleScalingPlan", ScalingPlanArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .friendlyName("Scaling Plan Example")
                .description("Example Scaling Plan")
                .timeZone("GMT Standard Time")
                .schedules(ScalingPlanScheduleArgs.builder()
                    .name("Weekdays")
                    .daysOfWeeks(                
                        "Monday",
                        "Tuesday",
                        "Wednesday",
                        "Thursday",
                        "Friday")
                    .rampUpStartTime("05:00")
                    .rampUpLoadBalancingAlgorithm("BreadthFirst")
                    .rampUpMinimumHostsPercent(20)
                    .rampUpCapacityThresholdPercent(10)
                    .peakStartTime("09:00")
                    .peakLoadBalancingAlgorithm("BreadthFirst")
                    .rampDownStartTime("19:00")
                    .rampDownLoadBalancingAlgorithm("DepthFirst")
                    .rampDownMinimumHostsPercent(10)
                    .rampDownForceLogoffUsers(false)
                    .rampDownWaitTimeMinutes(45)
                    .rampDownNotificationMessage("Please log off in the next 45 minutes...")
                    .rampDownCapacityThresholdPercent(5)
                    .rampDownStopHostsWhen("ZeroSessions")
                    .offPeakStartTime("22:00")
                    .offPeakLoadBalancingAlgorithm("DepthFirst")
                    .build())
                .hostPools(ScalingPlanHostPoolArgs.builder()
                    .hostpoolId(exampleHostPool.id())
                    .scalingPlanEnabled(true)
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_azuread as azuread
    import pulumi_random as random
    
    example_random_uuid = random.RandomUuid("exampleRandomUuid")
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_role_definition = azure.authorization.RoleDefinition("exampleRoleDefinition",
        scope=example_resource_group.id,
        description="AVD AutoScale Role",
        permissions=[azure.authorization.RoleDefinitionPermissionArgs(
            actions=[
                "Microsoft.Insights/eventtypes/values/read",
                "Microsoft.Compute/virtualMachines/deallocate/action",
                "Microsoft.Compute/virtualMachines/restart/action",
                "Microsoft.Compute/virtualMachines/powerOff/action",
                "Microsoft.Compute/virtualMachines/start/action",
                "Microsoft.Compute/virtualMachines/read",
                "Microsoft.DesktopVirtualization/hostpools/read",
                "Microsoft.DesktopVirtualization/hostpools/write",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/read",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/write",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/delete",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/sendMessage/action",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read",
            ],
            not_actions=[],
        )],
        assignable_scopes=[example_resource_group.id])
    example_service_principal = azuread.get_service_principal(display_name="Windows Virtual Desktop")
    example_assignment = azure.authorization.Assignment("exampleAssignment",
        name=example_random_uuid.result,
        scope=example_resource_group.id,
        role_definition_id=example_role_definition.role_definition_resource_id,
        principal_id=example_service_principal.id,
        skip_service_principal_aad_check=True)
    example_host_pool = azure.desktopvirtualization.HostPool("exampleHostPool",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        type="Pooled",
        validate_environment=True,
        load_balancer_type="BreadthFirst")
    example_scaling_plan = azure.desktopvirtualization.ScalingPlan("exampleScalingPlan",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        friendly_name="Scaling Plan Example",
        description="Example Scaling Plan",
        time_zone="GMT Standard Time",
        schedules=[azure.desktopvirtualization.ScalingPlanScheduleArgs(
            name="Weekdays",
            days_of_weeks=[
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday",
            ],
            ramp_up_start_time="05:00",
            ramp_up_load_balancing_algorithm="BreadthFirst",
            ramp_up_minimum_hosts_percent=20,
            ramp_up_capacity_threshold_percent=10,
            peak_start_time="09:00",
            peak_load_balancing_algorithm="BreadthFirst",
            ramp_down_start_time="19:00",
            ramp_down_load_balancing_algorithm="DepthFirst",
            ramp_down_minimum_hosts_percent=10,
            ramp_down_force_logoff_users=False,
            ramp_down_wait_time_minutes=45,
            ramp_down_notification_message="Please log off in the next 45 minutes...",
            ramp_down_capacity_threshold_percent=5,
            ramp_down_stop_hosts_when="ZeroSessions",
            off_peak_start_time="22:00",
            off_peak_load_balancing_algorithm="DepthFirst",
        )],
        host_pools=[azure.desktopvirtualization.ScalingPlanHostPoolArgs(
            hostpool_id=example_host_pool.id,
            scaling_plan_enabled=True,
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as azuread from "@pulumi/azuread";
    import * as random from "@pulumi/random";
    
    const exampleRandomUuid = new random.RandomUuid("exampleRandomUuid", {});
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleRoleDefinition = new azure.authorization.RoleDefinition("exampleRoleDefinition", {
        scope: exampleResourceGroup.id,
        description: "AVD AutoScale Role",
        permissions: [{
            actions: [
                "Microsoft.Insights/eventtypes/values/read",
                "Microsoft.Compute/virtualMachines/deallocate/action",
                "Microsoft.Compute/virtualMachines/restart/action",
                "Microsoft.Compute/virtualMachines/powerOff/action",
                "Microsoft.Compute/virtualMachines/start/action",
                "Microsoft.Compute/virtualMachines/read",
                "Microsoft.DesktopVirtualization/hostpools/read",
                "Microsoft.DesktopVirtualization/hostpools/write",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/read",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/write",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/delete",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/sendMessage/action",
                "Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read",
            ],
            notActions: [],
        }],
        assignableScopes: [exampleResourceGroup.id],
    });
    const exampleServicePrincipal = azuread.getServicePrincipal({
        displayName: "Windows Virtual Desktop",
    });
    const exampleAssignment = new azure.authorization.Assignment("exampleAssignment", {
        name: exampleRandomUuid.result,
        scope: exampleResourceGroup.id,
        roleDefinitionId: exampleRoleDefinition.roleDefinitionResourceId,
        principalId: exampleServicePrincipal.then(exampleServicePrincipal => exampleServicePrincipal.id),
        skipServicePrincipalAadCheck: true,
    });
    const exampleHostPool = new azure.desktopvirtualization.HostPool("exampleHostPool", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        type: "Pooled",
        validateEnvironment: true,
        loadBalancerType: "BreadthFirst",
    });
    const exampleScalingPlan = new azure.desktopvirtualization.ScalingPlan("exampleScalingPlan", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        friendlyName: "Scaling Plan Example",
        description: "Example Scaling Plan",
        timeZone: "GMT Standard Time",
        schedules: [{
            name: "Weekdays",
            daysOfWeeks: [
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday",
            ],
            rampUpStartTime: "05:00",
            rampUpLoadBalancingAlgorithm: "BreadthFirst",
            rampUpMinimumHostsPercent: 20,
            rampUpCapacityThresholdPercent: 10,
            peakStartTime: "09:00",
            peakLoadBalancingAlgorithm: "BreadthFirst",
            rampDownStartTime: "19:00",
            rampDownLoadBalancingAlgorithm: "DepthFirst",
            rampDownMinimumHostsPercent: 10,
            rampDownForceLogoffUsers: false,
            rampDownWaitTimeMinutes: 45,
            rampDownNotificationMessage: "Please log off in the next 45 minutes...",
            rampDownCapacityThresholdPercent: 5,
            rampDownStopHostsWhen: "ZeroSessions",
            offPeakStartTime: "22:00",
            offPeakLoadBalancingAlgorithm: "DepthFirst",
        }],
        hostPools: [{
            hostpoolId: exampleHostPool.id,
            scalingPlanEnabled: true,
        }],
    });
    
    resources:
      exampleRandomUuid:
        type: random:RandomUuid
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleRoleDefinition:
        type: azure:authorization:RoleDefinition
        properties:
          scope: ${exampleResourceGroup.id}
          description: AVD AutoScale Role
          permissions:
            - actions:
                - Microsoft.Insights/eventtypes/values/read
                - Microsoft.Compute/virtualMachines/deallocate/action
                - Microsoft.Compute/virtualMachines/restart/action
                - Microsoft.Compute/virtualMachines/powerOff/action
                - Microsoft.Compute/virtualMachines/start/action
                - Microsoft.Compute/virtualMachines/read
                - Microsoft.DesktopVirtualization/hostpools/read
                - Microsoft.DesktopVirtualization/hostpools/write
                - Microsoft.DesktopVirtualization/hostpools/sessionhosts/read
                - Microsoft.DesktopVirtualization/hostpools/sessionhosts/write
                - Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/delete
                - Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read
                - Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/sendMessage/action
                - Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/read
              notActions: []
          assignableScopes:
            - ${exampleResourceGroup.id}
      exampleAssignment:
        type: azure:authorization:Assignment
        properties:
          name: ${exampleRandomUuid.result}
          scope: ${exampleResourceGroup.id}
          roleDefinitionId: ${exampleRoleDefinition.roleDefinitionResourceId}
          principalId: ${exampleServicePrincipal.id}
          skipServicePrincipalAadCheck: true
      exampleHostPool:
        type: azure:desktopvirtualization:HostPool
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          type: Pooled
          validateEnvironment: true
          loadBalancerType: BreadthFirst
      exampleScalingPlan:
        type: azure:desktopvirtualization:ScalingPlan
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          friendlyName: Scaling Plan Example
          description: Example Scaling Plan
          timeZone: GMT Standard Time
          schedules:
            - name: Weekdays
              daysOfWeeks:
                - Monday
                - Tuesday
                - Wednesday
                - Thursday
                - Friday
              rampUpStartTime: 05:00
              rampUpLoadBalancingAlgorithm: BreadthFirst
              rampUpMinimumHostsPercent: 20
              rampUpCapacityThresholdPercent: 10
              peakStartTime: 09:00
              peakLoadBalancingAlgorithm: BreadthFirst
              rampDownStartTime: 19:00
              rampDownLoadBalancingAlgorithm: DepthFirst
              rampDownMinimumHostsPercent: 10
              rampDownForceLogoffUsers: false
              rampDownWaitTimeMinutes: 45
              rampDownNotificationMessage: Please log off in the next 45 minutes...
              rampDownCapacityThresholdPercent: 5
              rampDownStopHostsWhen: ZeroSessions
              offPeakStartTime: 22:00
              offPeakLoadBalancingAlgorithm: DepthFirst
          hostPools:
            - hostpoolId: ${exampleHostPool.id}
              scalingPlanEnabled: true
    variables:
      exampleServicePrincipal:
        fn::invoke:
          Function: azuread:getServicePrincipal
          Arguments:
            displayName: Windows Virtual Desktop
    

    Create ScalingPlan Resource

    new ScalingPlan(name: string, args: ScalingPlanArgs, opts?: CustomResourceOptions);
    @overload
    def ScalingPlan(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    description: Optional[str] = None,
                    exclusion_tag: Optional[str] = None,
                    friendly_name: Optional[str] = None,
                    host_pools: Optional[Sequence[ScalingPlanHostPoolArgs]] = None,
                    location: Optional[str] = None,
                    name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    schedules: Optional[Sequence[ScalingPlanScheduleArgs]] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    time_zone: Optional[str] = None)
    @overload
    def ScalingPlan(resource_name: str,
                    args: ScalingPlanArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewScalingPlan(ctx *Context, name string, args ScalingPlanArgs, opts ...ResourceOption) (*ScalingPlan, error)
    public ScalingPlan(string name, ScalingPlanArgs args, CustomResourceOptions? opts = null)
    public ScalingPlan(String name, ScalingPlanArgs args)
    public ScalingPlan(String name, ScalingPlanArgs args, CustomResourceOptions options)
    
    type: azure:desktopvirtualization:ScalingPlan
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ScalingPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ScalingPlanArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ScalingPlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScalingPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScalingPlanArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ScalingPlan Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ScalingPlan resource accepts the following input properties:

    ResourceGroupName string

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Schedules List<ScalingPlanSchedule>

    One or more schedule blocks as defined below.

    TimeZone string

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    Description string

    A description of the Scaling Plan.

    ExclusionTag string

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    FriendlyName string

    Friendly name of the Scaling Plan.

    HostPools List<ScalingPlanHostPool>

    One or more host_pool blocks as defined below.

    Location string

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Name string

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Tags Dictionary<string, string>

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    ResourceGroupName string

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Schedules []ScalingPlanScheduleArgs

    One or more schedule blocks as defined below.

    TimeZone string

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    Description string

    A description of the Scaling Plan.

    ExclusionTag string

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    FriendlyName string

    Friendly name of the Scaling Plan.

    HostPools []ScalingPlanHostPoolArgs

    One or more host_pool blocks as defined below.

    Location string

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Name string

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Tags map[string]string

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    resourceGroupName String

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    schedules List<ScalingPlanSchedule>

    One or more schedule blocks as defined below.

    timeZone String

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    description String

    A description of the Scaling Plan.

    exclusionTag String

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    friendlyName String

    Friendly name of the Scaling Plan.

    hostPools List<ScalingPlanHostPool>

    One or more host_pool blocks as defined below.

    location String

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    name String

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    tags Map<String,String>

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    resourceGroupName string

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    schedules ScalingPlanSchedule[]

    One or more schedule blocks as defined below.

    timeZone string

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    description string

    A description of the Scaling Plan.

    exclusionTag string

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    friendlyName string

    Friendly name of the Scaling Plan.

    hostPools ScalingPlanHostPool[]

    One or more host_pool blocks as defined below.

    location string

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    name string

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    tags {[key: string]: string}

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    resource_group_name str

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    schedules Sequence[ScalingPlanScheduleArgs]

    One or more schedule blocks as defined below.

    time_zone str

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    description str

    A description of the Scaling Plan.

    exclusion_tag str

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    friendly_name str

    Friendly name of the Scaling Plan.

    host_pools Sequence[ScalingPlanHostPoolArgs]

    One or more host_pool blocks as defined below.

    location str

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    name str

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    tags Mapping[str, str]

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    resourceGroupName String

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    schedules List<Property Map>

    One or more schedule blocks as defined below.

    timeZone String

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    description String

    A description of the Scaling Plan.

    exclusionTag String

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    friendlyName String

    Friendly name of the Scaling Plan.

    hostPools List<Property Map>

    One or more host_pool blocks as defined below.

    location String

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    name String

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    tags Map<String>

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ScalingPlan resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing ScalingPlan Resource

    Get an existing ScalingPlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ScalingPlanState, opts?: CustomResourceOptions): ScalingPlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            exclusion_tag: Optional[str] = None,
            friendly_name: Optional[str] = None,
            host_pools: Optional[Sequence[ScalingPlanHostPoolArgs]] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            schedules: Optional[Sequence[ScalingPlanScheduleArgs]] = None,
            tags: Optional[Mapping[str, str]] = None,
            time_zone: Optional[str] = None) -> ScalingPlan
    func GetScalingPlan(ctx *Context, name string, id IDInput, state *ScalingPlanState, opts ...ResourceOption) (*ScalingPlan, error)
    public static ScalingPlan Get(string name, Input<string> id, ScalingPlanState? state, CustomResourceOptions? opts = null)
    public static ScalingPlan get(String name, Output<String> id, ScalingPlanState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string

    A description of the Scaling Plan.

    ExclusionTag string

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    FriendlyName string

    Friendly name of the Scaling Plan.

    HostPools List<ScalingPlanHostPool>

    One or more host_pool blocks as defined below.

    Location string

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Name string

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    ResourceGroupName string

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Schedules List<ScalingPlanSchedule>

    One or more schedule blocks as defined below.

    Tags Dictionary<string, string>

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    TimeZone string

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    Description string

    A description of the Scaling Plan.

    ExclusionTag string

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    FriendlyName string

    Friendly name of the Scaling Plan.

    HostPools []ScalingPlanHostPoolArgs

    One or more host_pool blocks as defined below.

    Location string

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Name string

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    ResourceGroupName string

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    Schedules []ScalingPlanScheduleArgs

    One or more schedule blocks as defined below.

    Tags map[string]string

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    TimeZone string

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    description String

    A description of the Scaling Plan.

    exclusionTag String

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    friendlyName String

    Friendly name of the Scaling Plan.

    hostPools List<ScalingPlanHostPool>

    One or more host_pool blocks as defined below.

    location String

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    name String

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    resourceGroupName String

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    schedules List<ScalingPlanSchedule>

    One or more schedule blocks as defined below.

    tags Map<String,String>

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    timeZone String

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    description string

    A description of the Scaling Plan.

    exclusionTag string

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    friendlyName string

    Friendly name of the Scaling Plan.

    hostPools ScalingPlanHostPool[]

    One or more host_pool blocks as defined below.

    location string

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    name string

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    resourceGroupName string

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    schedules ScalingPlanSchedule[]

    One or more schedule blocks as defined below.

    tags {[key: string]: string}

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    timeZone string

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    description str

    A description of the Scaling Plan.

    exclusion_tag str

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    friendly_name str

    Friendly name of the Scaling Plan.

    host_pools Sequence[ScalingPlanHostPoolArgs]

    One or more host_pool blocks as defined below.

    location str

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    name str

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    resource_group_name str

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    schedules Sequence[ScalingPlanScheduleArgs]

    One or more schedule blocks as defined below.

    tags Mapping[str, str]

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    time_zone str

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    description String

    A description of the Scaling Plan.

    exclusionTag String

    The name of the tag associated with the VMs you want to exclude from autoscaling.

    friendlyName String

    Friendly name of the Scaling Plan.

    hostPools List<Property Map>

    One or more host_pool blocks as defined below.

    location String

    The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    name String

    The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

    resourceGroupName String

    The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.

    schedules List<Property Map>

    One or more schedule blocks as defined below.

    tags Map<String>

    A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

    timeZone String

    Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

    Supporting Types

    ScalingPlanHostPool, ScalingPlanHostPoolArgs

    HostpoolId string

    The ID of the HostPool to assign the Scaling Plan to.

    ScalingPlanEnabled bool

    Specifies if the scaling plan is enabled or disabled for the HostPool.

    HostpoolId string

    The ID of the HostPool to assign the Scaling Plan to.

    ScalingPlanEnabled bool

    Specifies if the scaling plan is enabled or disabled for the HostPool.

    hostpoolId String

    The ID of the HostPool to assign the Scaling Plan to.

    scalingPlanEnabled Boolean

    Specifies if the scaling plan is enabled or disabled for the HostPool.

    hostpoolId string

    The ID of the HostPool to assign the Scaling Plan to.

    scalingPlanEnabled boolean

    Specifies if the scaling plan is enabled or disabled for the HostPool.

    hostpool_id str

    The ID of the HostPool to assign the Scaling Plan to.

    scaling_plan_enabled bool

    Specifies if the scaling plan is enabled or disabled for the HostPool.

    hostpoolId String

    The ID of the HostPool to assign the Scaling Plan to.

    scalingPlanEnabled Boolean

    Specifies if the scaling plan is enabled or disabled for the HostPool.

    ScalingPlanSchedule, ScalingPlanScheduleArgs

    DaysOfWeeks List<string>

    A list of Days of the Week on which this schedule will be used. Possible values are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday

    Name string

    The name of the schedule.

    OffPeakLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during Off-Peak Hours. Possible values are DepthFirst and BreadthFirst.

    OffPeakStartTime string

    The time at which Off-Peak scaling will begin. This is also the end-time for the Ramp-Down period. The time must be specified in "HH:MM" format.

    PeakLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during Peak Hours. Possible values are DepthFirst and BreadthFirst.

    PeakStartTime string

    The time at which Peak scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    RampDownCapacityThresholdPercent int

    This is the value in percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-down and off-peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    RampDownForceLogoffUsers bool

    Whether users will be forced to log-off session hosts once the ramp_down_wait_time_minutes value has been exceeded during the Ramp-Down period. Possible

    RampDownLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during the Ramp-Down period. Possible values are DepthFirst and BreadthFirst.

    RampDownMinimumHostsPercent int

    The minimum percentage of session host virtual machines that you would like to get to for ramp-down and off-peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    RampDownNotificationMessage string

    The notification message to send to users during Ramp-Down period when they are required to log-off.

    RampDownStartTime string

    The time at which Ramp-Down scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    RampDownStopHostsWhen string

    Controls Session Host shutdown behaviour during Ramp-Down period. Session Hosts can either be shutdown when all sessions on the Session Host have ended, or when there are no Active sessions left on the Session Host. Possible values are ZeroSessions and ZeroActiveSessions.

    RampDownWaitTimeMinutes int

    The number of minutes during Ramp-Down period that autoscale will wait after setting the session host VMs to drain mode, notifying any currently signed in users to save their work before forcing the users to logoff. Once all user sessions on the session host VM have been logged off, Autoscale will shut down the VM.

    RampUpLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during the Ramp-Up period. Possible values are DepthFirst and BreadthFirst.

    RampUpStartTime string

    The time at which Ramp-Up scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    RampUpCapacityThresholdPercent int

    This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    RampUpMinimumHostsPercent int

    Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    DaysOfWeeks []string

    A list of Days of the Week on which this schedule will be used. Possible values are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday

    Name string

    The name of the schedule.

    OffPeakLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during Off-Peak Hours. Possible values are DepthFirst and BreadthFirst.

    OffPeakStartTime string

    The time at which Off-Peak scaling will begin. This is also the end-time for the Ramp-Down period. The time must be specified in "HH:MM" format.

    PeakLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during Peak Hours. Possible values are DepthFirst and BreadthFirst.

    PeakStartTime string

    The time at which Peak scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    RampDownCapacityThresholdPercent int

    This is the value in percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-down and off-peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    RampDownForceLogoffUsers bool

    Whether users will be forced to log-off session hosts once the ramp_down_wait_time_minutes value has been exceeded during the Ramp-Down period. Possible

    RampDownLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during the Ramp-Down period. Possible values are DepthFirst and BreadthFirst.

    RampDownMinimumHostsPercent int

    The minimum percentage of session host virtual machines that you would like to get to for ramp-down and off-peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    RampDownNotificationMessage string

    The notification message to send to users during Ramp-Down period when they are required to log-off.

    RampDownStartTime string

    The time at which Ramp-Down scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    RampDownStopHostsWhen string

    Controls Session Host shutdown behaviour during Ramp-Down period. Session Hosts can either be shutdown when all sessions on the Session Host have ended, or when there are no Active sessions left on the Session Host. Possible values are ZeroSessions and ZeroActiveSessions.

    RampDownWaitTimeMinutes int

    The number of minutes during Ramp-Down period that autoscale will wait after setting the session host VMs to drain mode, notifying any currently signed in users to save their work before forcing the users to logoff. Once all user sessions on the session host VM have been logged off, Autoscale will shut down the VM.

    RampUpLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during the Ramp-Up period. Possible values are DepthFirst and BreadthFirst.

    RampUpStartTime string

    The time at which Ramp-Up scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    RampUpCapacityThresholdPercent int

    This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    RampUpMinimumHostsPercent int

    Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    daysOfWeeks List<String>

    A list of Days of the Week on which this schedule will be used. Possible values are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday

    name String

    The name of the schedule.

    offPeakLoadBalancingAlgorithm String

    The load Balancing Algorithm to use during Off-Peak Hours. Possible values are DepthFirst and BreadthFirst.

    offPeakStartTime String

    The time at which Off-Peak scaling will begin. This is also the end-time for the Ramp-Down period. The time must be specified in "HH:MM" format.

    peakLoadBalancingAlgorithm String

    The load Balancing Algorithm to use during Peak Hours. Possible values are DepthFirst and BreadthFirst.

    peakStartTime String

    The time at which Peak scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampDownCapacityThresholdPercent Integer

    This is the value in percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-down and off-peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    rampDownForceLogoffUsers Boolean

    Whether users will be forced to log-off session hosts once the ramp_down_wait_time_minutes value has been exceeded during the Ramp-Down period. Possible

    rampDownLoadBalancingAlgorithm String

    The load Balancing Algorithm to use during the Ramp-Down period. Possible values are DepthFirst and BreadthFirst.

    rampDownMinimumHostsPercent Integer

    The minimum percentage of session host virtual machines that you would like to get to for ramp-down and off-peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    rampDownNotificationMessage String

    The notification message to send to users during Ramp-Down period when they are required to log-off.

    rampDownStartTime String

    The time at which Ramp-Down scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampDownStopHostsWhen String

    Controls Session Host shutdown behaviour during Ramp-Down period. Session Hosts can either be shutdown when all sessions on the Session Host have ended, or when there are no Active sessions left on the Session Host. Possible values are ZeroSessions and ZeroActiveSessions.

    rampDownWaitTimeMinutes Integer

    The number of minutes during Ramp-Down period that autoscale will wait after setting the session host VMs to drain mode, notifying any currently signed in users to save their work before forcing the users to logoff. Once all user sessions on the session host VM have been logged off, Autoscale will shut down the VM.

    rampUpLoadBalancingAlgorithm String

    The load Balancing Algorithm to use during the Ramp-Up period. Possible values are DepthFirst and BreadthFirst.

    rampUpStartTime String

    The time at which Ramp-Up scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampUpCapacityThresholdPercent Integer

    This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    rampUpMinimumHostsPercent Integer

    Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    daysOfWeeks string[]

    A list of Days of the Week on which this schedule will be used. Possible values are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday

    name string

    The name of the schedule.

    offPeakLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during Off-Peak Hours. Possible values are DepthFirst and BreadthFirst.

    offPeakStartTime string

    The time at which Off-Peak scaling will begin. This is also the end-time for the Ramp-Down period. The time must be specified in "HH:MM" format.

    peakLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during Peak Hours. Possible values are DepthFirst and BreadthFirst.

    peakStartTime string

    The time at which Peak scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampDownCapacityThresholdPercent number

    This is the value in percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-down and off-peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    rampDownForceLogoffUsers boolean

    Whether users will be forced to log-off session hosts once the ramp_down_wait_time_minutes value has been exceeded during the Ramp-Down period. Possible

    rampDownLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during the Ramp-Down period. Possible values are DepthFirst and BreadthFirst.

    rampDownMinimumHostsPercent number

    The minimum percentage of session host virtual machines that you would like to get to for ramp-down and off-peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    rampDownNotificationMessage string

    The notification message to send to users during Ramp-Down period when they are required to log-off.

    rampDownStartTime string

    The time at which Ramp-Down scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampDownStopHostsWhen string

    Controls Session Host shutdown behaviour during Ramp-Down period. Session Hosts can either be shutdown when all sessions on the Session Host have ended, or when there are no Active sessions left on the Session Host. Possible values are ZeroSessions and ZeroActiveSessions.

    rampDownWaitTimeMinutes number

    The number of minutes during Ramp-Down period that autoscale will wait after setting the session host VMs to drain mode, notifying any currently signed in users to save their work before forcing the users to logoff. Once all user sessions on the session host VM have been logged off, Autoscale will shut down the VM.

    rampUpLoadBalancingAlgorithm string

    The load Balancing Algorithm to use during the Ramp-Up period. Possible values are DepthFirst and BreadthFirst.

    rampUpStartTime string

    The time at which Ramp-Up scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampUpCapacityThresholdPercent number

    This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    rampUpMinimumHostsPercent number

    Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    days_of_weeks Sequence[str]

    A list of Days of the Week on which this schedule will be used. Possible values are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday

    name str

    The name of the schedule.

    off_peak_load_balancing_algorithm str

    The load Balancing Algorithm to use during Off-Peak Hours. Possible values are DepthFirst and BreadthFirst.

    off_peak_start_time str

    The time at which Off-Peak scaling will begin. This is also the end-time for the Ramp-Down period. The time must be specified in "HH:MM" format.

    peak_load_balancing_algorithm str

    The load Balancing Algorithm to use during Peak Hours. Possible values are DepthFirst and BreadthFirst.

    peak_start_time str

    The time at which Peak scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    ramp_down_capacity_threshold_percent int

    This is the value in percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-down and off-peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    ramp_down_force_logoff_users bool

    Whether users will be forced to log-off session hosts once the ramp_down_wait_time_minutes value has been exceeded during the Ramp-Down period. Possible

    ramp_down_load_balancing_algorithm str

    The load Balancing Algorithm to use during the Ramp-Down period. Possible values are DepthFirst and BreadthFirst.

    ramp_down_minimum_hosts_percent int

    The minimum percentage of session host virtual machines that you would like to get to for ramp-down and off-peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    ramp_down_notification_message str

    The notification message to send to users during Ramp-Down period when they are required to log-off.

    ramp_down_start_time str

    The time at which Ramp-Down scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    ramp_down_stop_hosts_when str

    Controls Session Host shutdown behaviour during Ramp-Down period. Session Hosts can either be shutdown when all sessions on the Session Host have ended, or when there are no Active sessions left on the Session Host. Possible values are ZeroSessions and ZeroActiveSessions.

    ramp_down_wait_time_minutes int

    The number of minutes during Ramp-Down period that autoscale will wait after setting the session host VMs to drain mode, notifying any currently signed in users to save their work before forcing the users to logoff. Once all user sessions on the session host VM have been logged off, Autoscale will shut down the VM.

    ramp_up_load_balancing_algorithm str

    The load Balancing Algorithm to use during the Ramp-Up period. Possible values are DepthFirst and BreadthFirst.

    ramp_up_start_time str

    The time at which Ramp-Up scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    ramp_up_capacity_threshold_percent int

    This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    ramp_up_minimum_hosts_percent int

    Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    daysOfWeeks List<String>

    A list of Days of the Week on which this schedule will be used. Possible values are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday

    name String

    The name of the schedule.

    offPeakLoadBalancingAlgorithm String

    The load Balancing Algorithm to use during Off-Peak Hours. Possible values are DepthFirst and BreadthFirst.

    offPeakStartTime String

    The time at which Off-Peak scaling will begin. This is also the end-time for the Ramp-Down period. The time must be specified in "HH:MM" format.

    peakLoadBalancingAlgorithm String

    The load Balancing Algorithm to use during Peak Hours. Possible values are DepthFirst and BreadthFirst.

    peakStartTime String

    The time at which Peak scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampDownCapacityThresholdPercent Number

    This is the value in percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-down and off-peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    rampDownForceLogoffUsers Boolean

    Whether users will be forced to log-off session hosts once the ramp_down_wait_time_minutes value has been exceeded during the Ramp-Down period. Possible

    rampDownLoadBalancingAlgorithm String

    The load Balancing Algorithm to use during the Ramp-Down period. Possible values are DepthFirst and BreadthFirst.

    rampDownMinimumHostsPercent Number

    The minimum percentage of session host virtual machines that you would like to get to for ramp-down and off-peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    rampDownNotificationMessage String

    The notification message to send to users during Ramp-Down period when they are required to log-off.

    rampDownStartTime String

    The time at which Ramp-Down scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampDownStopHostsWhen String

    Controls Session Host shutdown behaviour during Ramp-Down period. Session Hosts can either be shutdown when all sessions on the Session Host have ended, or when there are no Active sessions left on the Session Host. Possible values are ZeroSessions and ZeroActiveSessions.

    rampDownWaitTimeMinutes Number

    The number of minutes during Ramp-Down period that autoscale will wait after setting the session host VMs to drain mode, notifying any currently signed in users to save their work before forcing the users to logoff. Once all user sessions on the session host VM have been logged off, Autoscale will shut down the VM.

    rampUpLoadBalancingAlgorithm String

    The load Balancing Algorithm to use during the Ramp-Up period. Possible values are DepthFirst and BreadthFirst.

    rampUpStartTime String

    The time at which Ramp-Up scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.

    rampUpCapacityThresholdPercent Number

    This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.

    rampUpMinimumHostsPercent Number

    Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.

    Import

    Virtual Desktop Scaling Plans can be imported using the resource id, e.g.

     $ pulumi import azure:desktopvirtualization/scalingPlan:ScalingPlan example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/plan1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi