Virtual Desktop
Virtual Desktop scaling plan
Schedules changes to session-host capacity for Azure Virtual Desktop host pools.
Naming rules
- Abbreviation
- Length
- 3–64
- Allowed characters
- Pattern: ^[A-Za-z0-9@.\-_ ]*$
- Uniqueness scope
- See resource reference
Azure Verified Modules naming utility v0.3.0 · AVM naming key scaling_plan
Code examples
Adapt the examples to your environment and supply referenced resources and variables.
Terraform
Terraform documentationhcl
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
version = "~> 2.0"
}
}
}
variable "hostPoolId" {
type = string
}
variable "location" {
type = string
}
variable "name" {
type = string
}
variable "parent_id" {
description = "Full Azure resource ID of the parent resource or resource group."
type = string
}
resource "azapi_resource" "example" {
type = "Microsoft.DesktopVirtualization/scalingPlans@2026-04-16"
name = var.name
parent_id = var.parent_id
location = var.location
body = {
properties = {
hostPoolType = "Pooled"
timeZone = "UTC"
schedules = [
]
hostPoolReferences = [
{
hostPoolArmPath = var.hostPoolId
scalingPlanEnabled = false
}
]
}
}
}
Bicep
Bicep documentationbicep
param hostPoolId string
param location string
param name string
resource example 'Microsoft.DesktopVirtualization/scalingPlans@2026-04-16' = {
name: name
location: location
properties: {
hostPoolType: 'Pooled'
timeZone: 'UTC'
schedules: [
]
hostPoolReferences: [
{
hostPoolArmPath: hostPoolId
scalingPlanEnabled: false
}
]
}
}
ARM template
ARM template documentationjson
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"hostPoolId": {
"type": "string"
},
"location": {
"type": "string"
},
"name": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.DesktopVirtualization/scalingPlans",
"apiVersion": "2026-04-16",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"properties": {
"hostPoolType": "Pooled",
"timeZone": "UTC",
"schedules": [],
"hostPoolReferences": [
{
"hostPoolArmPath": "[parameters('hostPoolId')]",
"scalingPlanEnabled": false
}
]
}
}
]
}