Scaling Plan Personal Schedules - Create

Create or update a ScalingPlanPersonalSchedule.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}?api-version=2026-04-16

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.offPeakActionOnDisconnect

SessionHandlingOperation

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

properties.offPeakActionOnLogoff

SessionHandlingOperation

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

properties.offPeakMinutesToWaitOnDisconnect

integer (int32)

minimum: 0

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

properties.offPeakMinutesToWaitOnLogoff

integer (int32)

minimum: 0

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

properties.offPeakStartTime

Time

Starting time for off-peak period.

properties.offPeakStartVMOnConnect

SetStartVMOnConnect

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

properties.peakActionOnDisconnect

SessionHandlingOperation

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

properties.peakActionOnLogoff

SessionHandlingOperation

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

properties.peakMinutesToWaitOnDisconnect

integer (int32)

minimum: 0

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

properties.peakMinutesToWaitOnLogoff

integer (int32)

minimum: 0

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

properties.peakStartTime

Time

Starting time for peak period.

properties.peakStartVMOnConnect

SetStartVMOnConnect

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

properties.rampDownActionOnDisconnect

SessionHandlingOperation

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

properties.rampDownActionOnLogoff

SessionHandlingOperation

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

properties.rampDownMinutesToWaitOnDisconnect

integer (int32)

minimum: 0

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

properties.rampDownMinutesToWaitOnLogoff

integer (int32)

minimum: 0

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

properties.rampDownStartTime

Time

Starting time for ramp down period.

properties.rampDownStartVMOnConnect

SetStartVMOnConnect

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

properties.rampUpActionOnDisconnect

SessionHandlingOperation

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

properties.rampUpActionOnLogoff

SessionHandlingOperation

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

properties.rampUpAutoStartHosts

StartupBehavior

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

properties.rampUpMinutesToWaitOnDisconnect

integer (int32)

minimum: 0

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

properties.rampUpMinutesToWaitOnLogoff

integer (int32)

minimum: 0

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

properties.rampUpStartTime

Time

Starting time for ramp up period.

properties.rampUpStartVMOnConnect

SetStartVMOnConnect

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.

Responses

Name Type Description
200 OK

ScalingPlanPersonalSchedule

Resource 'ScalingPlanPersonalSchedule' update operation succeeded

201 Created

ScalingPlanPersonalSchedule

Resource 'ScalingPlanPersonalSchedule' create operation succeeded

Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ScalingPlanPersonalSchedules_Create

Sample request

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

{
  "properties": {
    "daysOfWeek": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday"
    ],
    "rampUpStartTime": {
      "hour": 6,
      "minute": 0
    },
    "rampUpAutoStartHosts": "All",
    "rampUpStartVMOnConnect": "Enable",
    "rampUpActionOnDisconnect": "None",
    "rampUpMinutesToWaitOnDisconnect": 10,
    "rampUpActionOnLogoff": "None",
    "rampUpMinutesToWaitOnLogoff": 10,
    "peakStartTime": {
      "hour": 8,
      "minute": 0
    },
    "peakStartVMOnConnect": "Enable",
    "peakActionOnDisconnect": "None",
    "peakMinutesToWaitOnDisconnect": 10,
    "peakActionOnLogoff": "Deallocate",
    "peakMinutesToWaitOnLogoff": 10,
    "rampDownStartTime": {
      "hour": 18,
      "minute": 0
    },
    "rampDownStartVMOnConnect": "Enable",
    "rampDownActionOnDisconnect": "None",
    "rampDownMinutesToWaitOnDisconnect": 10,
    "rampDownActionOnLogoff": "Deallocate",
    "rampDownMinutesToWaitOnLogoff": 10,
    "offPeakStartTime": {
      "hour": 20,
      "minute": 0
    },
    "offPeakStartVMOnConnect": "Enable",
    "offPeakActionOnDisconnect": "None",
    "offPeakMinutesToWaitOnDisconnect": 10,
    "offPeakActionOnLogoff": "Deallocate",
    "offPeakMinutesToWaitOnLogoff": 10
  }
}

Sample response

{
  "name": "scalingPlanScheduleWeekdays1",
  "id": "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/personalSchedules/scalingPlanScheduleWeekdays1",
  "type": "Microsoft.DesktopVirtualization/scalingPlans/personalSchedules",
  "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
    },
    "rampUpAutoStartHosts": "All",
    "rampUpActionOnDisconnect": "None",
    "rampUpMinutesToWaitOnDisconnect": 10,
    "rampUpActionOnLogoff": "None",
    "rampUpMinutesToWaitOnLogoff": 10,
    "peakStartTime": {
      "hour": 8,
      "minute": 0
    },
    "peakStartVMOnConnect": "Enable",
    "peakActionOnDisconnect": "None",
    "peakMinutesToWaitOnDisconnect": 10,
    "peakActionOnLogoff": "Deallocate",
    "peakMinutesToWaitOnLogoff": 10,
    "rampDownStartTime": {
      "hour": 18,
      "minute": 0
    },
    "rampDownStartVMOnConnect": "Enable",
    "rampDownActionOnDisconnect": "None",
    "rampDownMinutesToWaitOnDisconnect": 10,
    "rampDownActionOnLogoff": "Deallocate",
    "rampDownMinutesToWaitOnLogoff": 10,
    "offPeakStartTime": {
      "hour": 20,
      "minute": 0
    },
    "offPeakStartVMOnConnect": "Enable",
    "offPeakActionOnDisconnect": "None",
    "offPeakMinutesToWaitOnDisconnect": 10,
    "offPeakActionOnLogoff": "Deallocate",
    "offPeakMinutesToWaitOnLogoff": 10
  }
}
{
  "name": "scalingPlanScheduleWeekdays1",
  "id": "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/personalSchedules/scalingPlanScheduleWeekdays1",
  "type": "Microsoft.DesktopVirtualization/scalingPlans/personalSchedules",
  "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
    },
    "rampUpAutoStartHosts": "All",
    "rampUpStartVMOnConnect": "Enable",
    "rampUpActionOnDisconnect": "None",
    "rampUpMinutesToWaitOnDisconnect": 10,
    "rampUpActionOnLogoff": "None",
    "rampUpMinutesToWaitOnLogoff": 10,
    "peakStartTime": {
      "hour": 8,
      "minute": 0
    },
    "peakStartVMOnConnect": "Enable",
    "peakActionOnDisconnect": "Deallocate",
    "peakMinutesToWaitOnDisconnect": 10,
    "peakActionOnLogoff": "Deallocate",
    "peakMinutesToWaitOnLogoff": 10,
    "rampDownStartTime": {
      "hour": 18,
      "minute": 0
    },
    "rampDownStartVMOnConnect": "Enable",
    "rampDownActionOnDisconnect": "None",
    "rampDownMinutesToWaitOnDisconnect": 10,
    "rampDownActionOnLogoff": "Deallocate",
    "rampDownMinutesToWaitOnLogoff": 10,
    "offPeakStartTime": {
      "hour": 20,
      "minute": 0
    },
    "offPeakStartVMOnConnect": "Enable",
    "offPeakActionOnDisconnect": "None",
    "offPeakMinutesToWaitOnDisconnect": 10,
    "offPeakActionOnLogoff": "Deallocate",
    "offPeakMinutesToWaitOnLogoff": 10
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

DayOfWeek

Day of the week. Modeled as string

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ScalingPlanPersonalSchedule

Represents a ScalingPlanPersonalSchedule definition.

SessionHandlingOperation

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

SetStartVMOnConnect

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.

StartupBehavior

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

systemData

Metadata pertaining to creation and last modification of the resource.

Time

The time for a scaling action to occur.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DayOfWeek

Day of the week. Modeled as string

Value Description
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ScalingPlanPersonalSchedule

Represents a ScalingPlanPersonalSchedule definition.

Name Type Default value 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.offPeakActionOnDisconnect

SessionHandlingOperation

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

properties.offPeakActionOnLogoff

SessionHandlingOperation

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

properties.offPeakMinutesToWaitOnDisconnect

integer (int32)

minimum: 0

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

properties.offPeakMinutesToWaitOnLogoff

integer (int32)

minimum: 0

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

properties.offPeakStartTime

Time

Starting time for off-peak period.

properties.offPeakStartVMOnConnect

SetStartVMOnConnect

Enable

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

properties.peakActionOnDisconnect

SessionHandlingOperation

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

properties.peakActionOnLogoff

SessionHandlingOperation

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

properties.peakMinutesToWaitOnDisconnect

integer (int32)

minimum: 0

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

properties.peakMinutesToWaitOnLogoff

integer (int32)

minimum: 0

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

properties.peakStartTime

Time

Starting time for peak period.

properties.peakStartVMOnConnect

SetStartVMOnConnect

Enable

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

properties.rampDownActionOnDisconnect

SessionHandlingOperation

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

properties.rampDownActionOnLogoff

SessionHandlingOperation

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

properties.rampDownMinutesToWaitOnDisconnect

integer (int32)

minimum: 0

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

properties.rampDownMinutesToWaitOnLogoff

integer (int32)

minimum: 0

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

properties.rampDownStartTime

Time

Starting time for ramp down period.

properties.rampDownStartVMOnConnect

SetStartVMOnConnect

Enable

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

properties.rampUpActionOnDisconnect

SessionHandlingOperation

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

properties.rampUpActionOnLogoff

SessionHandlingOperation

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

properties.rampUpAutoStartHosts

StartupBehavior

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

properties.rampUpMinutesToWaitOnDisconnect

integer (int32)

minimum: 0

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

properties.rampUpMinutesToWaitOnLogoff

integer (int32)

minimum: 0

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

properties.rampUpStartTime

Time

Starting time for ramp up period.

properties.rampUpStartVMOnConnect

SetStartVMOnConnect

Enable

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.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

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

SessionHandlingOperation

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

Value Description
None

No action will be taken after disconnect

Deallocate

Session Host will be deallocated after disconnect

Hibernate

Session Host will hibernate after disconnect

SetStartVMOnConnect

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.

Value Description
Enable

Start VM on Connect is enabled

Disable

Start VM on Connect is disabled, must use rampUpAutoStartHosts or turn on manually

StartupBehavior

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

Value Description
None

Session hosts will not be started by the service. This setting depends on Start VM on Connect to be enabled to start the session hosts.

WithAssignedUser

Session hosts with an assigned user will be started during Ramp Up

All

All personal session hosts in the hostpool will be started during ramp up.

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.