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 |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
scaling
|
path | True |
string minLength: 3maxLength: 64 pattern: ^[A-Za-z0-9@.\-_ ]*$ |
The name of the scaling plan. |
|
scaling
|
path | True |
string minLength: 1maxLength: 64 pattern: ^[A-Za-z0-9@.\-_ ]*$ |
The name of the ScalingPlanSchedule |
|
subscription
|
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 |
Set of days of the week on which this schedule is active. |
|
| properties.offPeakActionOnDisconnect |
Action to be taken after a user disconnect during the off-peak period. |
|
| properties.offPeakActionOnLogoff |
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 |
Starting time for off-peak period. |
|
| properties.offPeakStartVMOnConnect |
The desired configuration of Start VM On Connect for the hostpool during the off-peak phase. |
|
| properties.peakActionOnDisconnect |
Action to be taken after a user disconnect during the peak period. |
|
| properties.peakActionOnLogoff |
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 |
Starting time for peak period. |
|
| properties.peakStartVMOnConnect |
The desired configuration of Start VM On Connect for the hostpool during the peak phase. |
|
| properties.rampDownActionOnDisconnect |
Action to be taken after a user disconnect during the ramp down period. |
|
| properties.rampDownActionOnLogoff |
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 |
Starting time for ramp down period. |
|
| properties.rampDownStartVMOnConnect |
The desired configuration of Start VM On Connect for the hostpool during the ramp down phase. |
|
| properties.rampUpActionOnDisconnect |
Action to be taken after a user disconnect during the ramp up period. |
|
| properties.rampUpActionOnLogoff |
Action to be taken after a logoff during the ramp up period. |
|
| properties.rampUpAutoStartHosts |
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 |
Starting time for ramp up period. |
|
| properties.rampUpStartVMOnConnect |
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 |
Resource 'ScalingPlanPersonalSchedule' update operation succeeded |
|
| 201 Created |
Resource 'ScalingPlanPersonalSchedule' create operation succeeded |
|
| Other Status Codes |
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 |
|---|---|
|
created |
The type of identity that created the resource. |
|
Day |
Day of the week. Modeled as string |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Scaling |
Represents a ScalingPlanPersonalSchedule definition. |
|
Session |
Action to be taken after a user disconnect during the ramp up period. |
|
Set |
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. |
|
Startup |
The desired startup behavior during the ramp up period for personal vms in the hostpool. |
|
system |
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 |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
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 |
Set of days of the week on which this schedule is active. |
||
| properties.offPeakActionOnDisconnect |
Action to be taken after a user disconnect during the off-peak period. |
||
| properties.offPeakActionOnLogoff |
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 |
Starting time for off-peak period. |
||
| properties.offPeakStartVMOnConnect | Enable |
The desired configuration of Start VM On Connect for the hostpool during the off-peak phase. |
|
| properties.peakActionOnDisconnect |
Action to be taken after a user disconnect during the peak period. |
||
| properties.peakActionOnLogoff |
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 |
Starting time for peak period. |
||
| properties.peakStartVMOnConnect | Enable |
The desired configuration of Start VM On Connect for the hostpool during the peak phase. |
|
| properties.rampDownActionOnDisconnect |
Action to be taken after a user disconnect during the ramp down period. |
||
| properties.rampDownActionOnLogoff |
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 |
Starting time for ramp down period. |
||
| properties.rampDownStartVMOnConnect | Enable |
The desired configuration of Start VM On Connect for the hostpool during the ramp down phase. |
|
| properties.rampUpActionOnDisconnect |
Action to be taken after a user disconnect during the ramp up period. |
||
| properties.rampUpActionOnLogoff |
Action to be taken after a logoff during the ramp up period. |
||
| properties.rampUpAutoStartHosts |
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 |
Starting time for ramp up period. |
||
| properties.rampUpStartVMOnConnect | 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 |
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 |
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 |
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: 0maximum: 23 |
The hour. |
| minute |
integer (int32) minimum: 0maximum: 59 |
The minute. |