Share via


Scaling Plan Pooled Schedules - Create

Create or update a ScalingPlanPooledSchedule.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules/{scalingPlanScheduleName}?api-version=2025-10-10

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

scalingPlanName
path True

string

minLength: 3
maxLength: 64
pattern: ^[A-Za-z0-9@.\-_ ]*$

The name of the scaling plan.

scalingPlanScheduleName
path True

string

minLength: 1
maxLength: 64
pattern: ^[A-Za-z0-9@.\-_ ]*$

The name of the ScalingPlanSchedule

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Type Description
properties.daysOfWeek

DayOfWeek[]

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

properties.offPeakLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for off-peak period.

properties.offPeakStartTime

Time

Starting time for off-peak period.

properties.peakLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for peak period.

properties.peakStartTime

Time

Starting time for peak period.

properties.rampDownCapacityThresholdPct

integer (int32)

minimum: 1
maximum: 100

Capacity threshold for ramp down period.

properties.rampDownForceLogoffUsers

boolean

Should users be logged off forcefully from hosts.

properties.rampDownLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for ramp down period.

properties.rampDownMinimumHostsPct

integer (int32)

minimum: 0
maximum: 100

Minimum host percentage for ramp down period.

properties.rampDownNotificationMessage

string

Notification message for users during ramp down period.

properties.rampDownStartTime

Time

Starting time for ramp down period.

properties.rampDownStopHostsWhen

StopHostsWhen

Specifies when to stop hosts during ramp down period.

properties.rampDownWaitTimeMinutes

integer (int32)

Number of minutes to wait to stop hosts during ramp down period.

properties.rampUpCapacityThresholdPct

integer (int32)

minimum: 1
maximum: 100

Capacity threshold for ramp up period.

properties.rampUpLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for ramp up period.

properties.rampUpMinimumHostsPct

integer (int32)

minimum: 0
maximum: 100

Minimum host percentage for ramp up period.

properties.rampUpStartTime

Time

Starting time for ramp up period.

Responses

Name Type Description
200 OK

ScalingPlanPooledSchedule

Successfully updated ScalingPlanPooledSchedule.

201 Created

ScalingPlanPooledSchedule

Successfully created ScalingPlanPooledSchedule.

Other Status Codes

CloudError

Automation error response describing why the operation failed.

Examples

ScalingPlanPooledSchedules_Create

Sample request

PUT https://management.azure.com/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/pooledSchedules/scalingPlanScheduleWeekdays1?api-version=2025-10-10

{
  "properties": {
    "daysOfWeek": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday"
    ],
    "rampUpStartTime": {
      "hour": 6,
      "minute": 0
    },
    "rampUpLoadBalancingAlgorithm": "DepthFirst",
    "rampUpMinimumHostsPct": 20,
    "rampUpCapacityThresholdPct": 80,
    "peakStartTime": {
      "hour": 8,
      "minute": 0
    },
    "peakLoadBalancingAlgorithm": "BreadthFirst",
    "rampDownStartTime": {
      "hour": 18,
      "minute": 0
    },
    "rampDownLoadBalancingAlgorithm": "DepthFirst",
    "rampDownMinimumHostsPct": 20,
    "rampDownCapacityThresholdPct": 50,
    "rampDownForceLogoffUsers": true,
    "rampDownWaitTimeMinutes": 30,
    "rampDownNotificationMessage": "message",
    "offPeakStartTime": {
      "hour": 20,
      "minute": 0
    },
    "offPeakLoadBalancingAlgorithm": "DepthFirst"
  }
}

Sample response

{
  "name": "scalingPlanScheduleWeekdays1",
  "id": "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/pooledSchedules/scalingPlanScheduleWeekdays1",
  "type": "Microsoft.DesktopVirtualization/scalingPlans/pooledSchedules",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "daysOfWeek": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday"
    ],
    "rampUpStartTime": {
      "hour": 6,
      "minute": 0
    },
    "rampUpLoadBalancingAlgorithm": "DepthFirst",
    "rampUpMinimumHostsPct": 20,
    "rampUpCapacityThresholdPct": 80,
    "peakStartTime": {
      "hour": 8,
      "minute": 0
    },
    "peakLoadBalancingAlgorithm": "BreadthFirst",
    "rampDownStartTime": {
      "hour": 18,
      "minute": 0
    },
    "rampDownLoadBalancingAlgorithm": "DepthFirst",
    "rampDownMinimumHostsPct": 20,
    "rampDownCapacityThresholdPct": 50,
    "rampDownForceLogoffUsers": true,
    "rampDownWaitTimeMinutes": 30,
    "rampDownNotificationMessage": "message",
    "offPeakStartTime": {
      "hour": 20,
      "minute": 0
    },
    "offPeakLoadBalancingAlgorithm": "DepthFirst"
  }
}
{
  "name": "scalingPlanScheduleWeekdays1",
  "id": "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/pooledSchedules/scalingPlanScheduleWeekdays1",
  "type": "Microsoft.DesktopVirtualization/scalingPlans/pooledSchedules",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "daysOfWeek": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday"
    ],
    "rampUpStartTime": {
      "hour": 6,
      "minute": 0
    },
    "rampUpLoadBalancingAlgorithm": "DepthFirst",
    "rampUpMinimumHostsPct": 20,
    "rampUpCapacityThresholdPct": 80,
    "peakStartTime": {
      "hour": 8,
      "minute": 0
    },
    "peakLoadBalancingAlgorithm": "BreadthFirst",
    "rampDownStartTime": {
      "hour": 18,
      "minute": 0
    },
    "rampDownLoadBalancingAlgorithm": "DepthFirst",
    "rampDownMinimumHostsPct": 20,
    "rampDownCapacityThresholdPct": 50,
    "rampDownForceLogoffUsers": true,
    "rampDownWaitTimeMinutes": 30,
    "rampDownNotificationMessage": "message",
    "offPeakStartTime": {
      "hour": 20,
      "minute": 0
    },
    "offPeakLoadBalancingAlgorithm": "DepthFirst"
  }
}

Definitions

Name Description
CloudError

Cloud error object.

CloudErrorProperties

Cloud error object properties.

createdByType

The type of identity that created the resource.

DayOfWeek

Day of the week.

ScalingPlanPooledSchedule

Represents a ScalingPlanPooledSchedule definition.

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for ramp up period.

StopHostsWhen

Specifies when to stop hosts during ramp down period.

systemData

Metadata pertaining to creation and last modification of the resource.

Time

The time for a scaling action to occur.

CloudError

Cloud error object.

Name Type Description
error

CloudErrorProperties

Cloud error object properties.

CloudErrorProperties

Cloud error object properties.

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DayOfWeek

Day of the week.

Value Description
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday

ScalingPlanPooledSchedule

Represents a ScalingPlanPooledSchedule definition.

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.daysOfWeek

DayOfWeek[]

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

properties.offPeakLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for off-peak period.

properties.offPeakStartTime

Time

Starting time for off-peak period.

properties.peakLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for peak period.

properties.peakStartTime

Time

Starting time for peak period.

properties.rampDownCapacityThresholdPct

integer (int32)

minimum: 1
maximum: 100

Capacity threshold for ramp down period.

properties.rampDownForceLogoffUsers

boolean

Should users be logged off forcefully from hosts.

properties.rampDownLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for ramp down period.

properties.rampDownMinimumHostsPct

integer (int32)

minimum: 0
maximum: 100

Minimum host percentage for ramp down period.

properties.rampDownNotificationMessage

string

Notification message for users during ramp down period.

properties.rampDownStartTime

Time

Starting time for ramp down period.

properties.rampDownStopHostsWhen

StopHostsWhen

Specifies when to stop hosts during ramp down period.

properties.rampDownWaitTimeMinutes

integer (int32)

Number of minutes to wait to stop hosts during ramp down period.

properties.rampUpCapacityThresholdPct

integer (int32)

minimum: 1
maximum: 100

Capacity threshold for ramp up period.

properties.rampUpLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for ramp up period.

properties.rampUpMinimumHostsPct

integer (int32)

minimum: 0
maximum: 100

Minimum host percentage for ramp up period.

properties.rampUpStartTime

Time

Starting time for ramp up period.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

SessionHostLoadBalancingAlgorithm

Load balancing algorithm for ramp up period.

Value Description
BreadthFirst
DepthFirst

StopHostsWhen

Specifies when to stop hosts during ramp down period.

Value Description
ZeroSessions
ZeroActiveSessions

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

Time

The time for a scaling action to occur.

Name Type Description
hour

integer (int32)

minimum: 0
maximum: 23

The hour.

minute

integer (int32)

minimum: 0
maximum: 59

The minute.