你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

Microsoft.DesktopVirtualization 扩展计划 2023-09-05

Bicep 资源定义

可以使用目标操作部署 scalingPlans 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志。

用法示例

Azure 验证模块

以下 Azure 验证模块 可用于部署此资源类型。

模块 描述
Azure 虚拟桌面(AVD)缩放计划 适用于 Azure 虚拟桌面 (AVD) 缩放计划的 AVM 资源模块

资源格式

若要创建 Microsoft.DesktopVirtualization/scalingPlans 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.DesktopVirtualization/scalingPlans@2023-09-05' = {
  identity: {
    type: 'SystemAssigned'
  }
  kind: 'string'
  location: 'string'
  managedBy: 'string'
  name: 'string'
  plan: {
    name: 'string'
    product: 'string'
    promotionCode: 'string'
    publisher: 'string'
    version: 'string'
  }
  properties: {
    description: 'string'
    exclusionTag: 'string'
    friendlyName: 'string'
    hostPoolReferences: [
      {
        hostPoolArmPath: 'string'
        scalingPlanEnabled: bool
      }
    ]
    hostPoolType: 'string'
    schedules: [
      {
        daysOfWeek: [
          'string'
        ]
        name: 'string'
        offPeakLoadBalancingAlgorithm: 'string'
        offPeakStartTime: {
          hour: int
          minute: int
        }
        peakLoadBalancingAlgorithm: 'string'
        peakStartTime: {
          hour: int
          minute: int
        }
        rampDownCapacityThresholdPct: int
        rampDownForceLogoffUsers: bool
        rampDownLoadBalancingAlgorithm: 'string'
        rampDownMinimumHostsPct: int
        rampDownNotificationMessage: 'string'
        rampDownStartTime: {
          hour: int
          minute: int
        }
        rampDownStopHostsWhen: 'string'
        rampDownWaitTimeMinutes: int
        rampUpCapacityThresholdPct: int
        rampUpLoadBalancingAlgorithm: 'string'
        rampUpMinimumHostsPct: int
        rampUpStartTime: {
          hour: int
          minute: int
        }
      }
    ]
    timeZone: 'string'
  }
  sku: {
    capacity: int
    family: 'string'
    name: 'string'
    size: 'string'
    tier: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

Microsoft.DesktopVirtualization/scalingPlans

名字 描述 价值
标识 ResourceModelWithAllowedPropertySetIdentity
类 门户/工具等用于为相同类型的资源呈现不同的 UX 体验的元数据;例如,ApiApps 是一种 Microsoft.Web/sites 类型。 如果受支持,资源提供程序必须验证并保留此值。 字符串

约束:
图案 = ^[-\w\._,\(\)]+$
位置 资源所在的地理位置 字符串
managedBy 管理此资源的资源的完全限定资源 ID。 指示此资源是否由另一个 Azure 资源管理。 如果存在,则完全模式部署不会删除资源(如果从模板中删除,因为它由另一个资源管理)。 字符串
名字 资源名称 字符串

约束:
最小长度 = 3
最大长度 = 64 (必需)
计划 ResourceModelWithAllowedPropertySetPlan
性能 缩放计划的详细属性。 ScalingPlanProperties (必需)
sku ResourceModelWithAllowedPropertySetSku
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

ResourceModelWithAllowedPropertySetIdentity

名字 描述 价值
类型 标识类型。 “SystemAssigned”

ResourceModelWithAllowedPropertySetPlan

名字 描述 价值
名字 正在采购的第三方项目的用户定义的名称。 string (必需)
产品 正在采购的第三方项目。 例如 NewRelic。 产品映射到在数据市场载入时为项目指定的 OfferID。 string (必需)
促销代码 发布者为上述产品/项目提供数据市场中预配的促销代码。 字符串
发布服务器 正在购买的第三方项目的发布者。 例如 NewRelic string (必需)
版本 所需产品/项目的版本。 字符串

ResourceModelWithAllowedPropertySetSku

名字 描述 价值
产能 如果 SKU 支持横向扩展/缩减,则应包含容量整数。 如果资源无法横向扩展/缩小,则可能会省略此范围。 整数 (int)
家庭 如果服务具有不同代的硬件(对于同一 SKU,则可以在此处捕获)。 字符串
名字 SKU 的名称。 例 - P3。 它通常是字母+数字代码 string (必需)
大小 SKU 大小。 当名称字段是层和其他一些值的组合时,这将是独立的代码。 字符串
分层 如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。 “Basic”
“Free”
“Premium”
“Standard”

ResourceModelWithAllowedPropertySetTags

名字 描述 价值

ScalingHostPoolReference

名字 描述 价值
hostPoolArmPath 引用的 hostpool 的 Arm 路径。 字符串
scalingPlanEnabled 已启用 是否为此主机池启用了缩放计划。 布尔

ScalingPlanProperties

名字 描述 价值
描述 缩放计划的说明。 字符串
exclusion标签 缩放计划的排除标记。 字符串
友好名称 缩放计划的用户友好名称。 字符串
hostPool引用 ScalingHostPoolReference 定义列表。 ScalingHostPoolReference[]
hostPoolType (主机池类型) 适用于桌面的 HostPool 类型。 “Pooled”
附表 ScalingPlanPooledSchedule 定义的列表。 ScalingSchedule[]
时区 缩放计划的时区。 string (必需)

ScalingSchedule (缩放计划)

名字 描述 价值
周的天数 此计划处于活动状态的一周中的天数集。 包含任一项的字符串数组:
“Friday”
“Monday”
“Saturday”
“星期日”
“星期四”
“Tuesday”
“Wednesday”
名字 ScalingPlanPooledSchedule 的名称。 字符串
offPeakLoadBalancing算法 负载均衡算法用于非高峰期。 “BreadthFirst”
“DepthFirst”
关闭峰值开始时间 非高峰期的开始时间。 时间
peakLoadBalancing算法 高峰期的负载均衡算法。 “BreadthFirst”
“DepthFirst”
peakStartTime 高峰期的开始时间。 时间
rampDownCapacityThresholdPct 下降周期的容量阈值。 int

约束:
最小值 = 1
最大值 = 100
rampDownForceLogoffUsers 应从主机强制注销用户。 布尔
rampDownLoadBalancing算法 负载均衡算法的渐变周期。 “BreadthFirst”
“DepthFirst”
rampDownMinimumHostsPct 下降周期的最小主机百分比。 int

约束:
最小值 = 0
最大值 = 100
rampDownNotificationMessage 在渐变期间为用户发送通知消息。 字符串
rampDownStartTime 渐变期的开始时间。 时间
rampDownStopHosts当 指定何时在斜坡下降期间停止主机。 “ZeroActiveSessions”
“ZeroSessions”
rampDownWaitTimeMinutes 等待停止主机在坡道下降期间所等待的分钟数。 整数 (int)
rampUpCapacityThresholdPct 增加周期的容量阈值。 int

约束:
最小值 = 1
最大值 = 100
rampUpLoadBalancing算法 负载均衡算法用于增加周期。 “BreadthFirst”
“DepthFirst”
rampUpMinimumHostsPct 增加期间的最低主机百分比。 int

约束:
最小值 = 0
最大值 = 100
rampUpStartTime 加速周期的开始时间。 时间

时间

名字 描述 价值
小时 小时。 int

约束:
最小值 = 0
最大值 = 23 (必需)
分钟 分钟。 int

约束:
最小值 = 0
最大值 = 59 (必需)

ARM 模板资源定义

可以使用目标操作部署 scalingPlans 资源类型:

用法示例

资源格式

若要创建 Microsoft.DesktopVirtualization/scalingPlans 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.DesktopVirtualization/scalingPlans",
  "apiVersion": "2023-09-05",
  "name": "string",
  "identity": {
    "type": "SystemAssigned"
  },
  "kind": "string",
  "location": "string",
  "managedBy": "string",
  "plan": {
    "name": "string",
    "product": "string",
    "promotionCode": "string",
    "publisher": "string",
    "version": "string"
  },
  "properties": {
    "description": "string",
    "exclusionTag": "string",
    "friendlyName": "string",
    "hostPoolReferences": [
      {
        "hostPoolArmPath": "string",
        "scalingPlanEnabled": "bool"
      }
    ],
    "hostPoolType": "string",
    "schedules": [
      {
        "daysOfWeek": [ "string" ],
        "name": "string",
        "offPeakLoadBalancingAlgorithm": "string",
        "offPeakStartTime": {
          "hour": "int",
          "minute": "int"
        },
        "peakLoadBalancingAlgorithm": "string",
        "peakStartTime": {
          "hour": "int",
          "minute": "int"
        },
        "rampDownCapacityThresholdPct": "int",
        "rampDownForceLogoffUsers": "bool",
        "rampDownLoadBalancingAlgorithm": "string",
        "rampDownMinimumHostsPct": "int",
        "rampDownNotificationMessage": "string",
        "rampDownStartTime": {
          "hour": "int",
          "minute": "int"
        },
        "rampDownStopHostsWhen": "string",
        "rampDownWaitTimeMinutes": "int",
        "rampUpCapacityThresholdPct": "int",
        "rampUpLoadBalancingAlgorithm": "string",
        "rampUpMinimumHostsPct": "int",
        "rampUpStartTime": {
          "hour": "int",
          "minute": "int"
        }
      }
    ],
    "timeZone": "string"
  },
  "sku": {
    "capacity": "int",
    "family": "string",
    "name": "string",
    "size": "string",
    "tier": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

Microsoft.DesktopVirtualization/scalingPlans

名字 描述 价值
apiVersion API 版本 '2023-09-05'
标识 ResourceModelWithAllowedPropertySetIdentity
类 门户/工具等用于为相同类型的资源呈现不同的 UX 体验的元数据;例如,ApiApps 是一种 Microsoft.Web/sites 类型。 如果受支持,资源提供程序必须验证并保留此值。 字符串

约束:
图案 = ^[-\w\._,\(\)]+$
位置 资源所在的地理位置 字符串
managedBy 管理此资源的资源的完全限定资源 ID。 指示此资源是否由另一个 Azure 资源管理。 如果存在,则完全模式部署不会删除资源(如果从模板中删除,因为它由另一个资源管理)。 字符串
名字 资源名称 字符串

约束:
最小长度 = 3
最大长度 = 64 (必需)
计划 ResourceModelWithAllowedPropertySetPlan
性能 缩放计划的详细属性。 ScalingPlanProperties (必需)
sku ResourceModelWithAllowedPropertySetSku
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 “Microsoft.DesktopVirtualization/scalingPlans”

ResourceModelWithAllowedPropertySetIdentity

名字 描述 价值
类型 标识类型。 “SystemAssigned”

ResourceModelWithAllowedPropertySetPlan

名字 描述 价值
名字 正在采购的第三方项目的用户定义的名称。 string (必需)
产品 正在采购的第三方项目。 例如 NewRelic。 产品映射到在数据市场载入时为项目指定的 OfferID。 string (必需)
促销代码 发布者为上述产品/项目提供数据市场中预配的促销代码。 字符串
发布服务器 正在购买的第三方项目的发布者。 例如 NewRelic string (必需)
版本 所需产品/项目的版本。 字符串

ResourceModelWithAllowedPropertySetSku

名字 描述 价值
产能 如果 SKU 支持横向扩展/缩减,则应包含容量整数。 如果资源无法横向扩展/缩小,则可能会省略此范围。 整数 (int)
家庭 如果服务具有不同代的硬件(对于同一 SKU,则可以在此处捕获)。 字符串
名字 SKU 的名称。 例 - P3。 它通常是字母+数字代码 string (必需)
大小 SKU 大小。 当名称字段是层和其他一些值的组合时,这将是独立的代码。 字符串
分层 如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。 “Basic”
“Free”
“Premium”
“Standard”

ResourceModelWithAllowedPropertySetTags

名字 描述 价值

ScalingHostPoolReference

名字 描述 价值
hostPoolArmPath 引用的 hostpool 的 Arm 路径。 字符串
scalingPlanEnabled 已启用 是否为此主机池启用了缩放计划。 布尔

ScalingPlanProperties

名字 描述 价值
描述 缩放计划的说明。 字符串
exclusion标签 缩放计划的排除标记。 字符串
友好名称 缩放计划的用户友好名称。 字符串
hostPool引用 ScalingHostPoolReference 定义列表。 ScalingHostPoolReference[]
hostPoolType (主机池类型) 适用于桌面的 HostPool 类型。 “Pooled”
附表 ScalingPlanPooledSchedule 定义的列表。 ScalingSchedule[]
时区 缩放计划的时区。 string (必需)

ScalingSchedule (缩放计划)

名字 描述 价值
周的天数 此计划处于活动状态的一周中的天数集。 包含任一项的字符串数组:
“Friday”
“Monday”
“Saturday”
“星期日”
“星期四”
“Tuesday”
“Wednesday”
名字 ScalingPlanPooledSchedule 的名称。 字符串
offPeakLoadBalancing算法 负载均衡算法用于非高峰期。 “BreadthFirst”
“DepthFirst”
关闭峰值开始时间 非高峰期的开始时间。 时间
peakLoadBalancing算法 高峰期的负载均衡算法。 “BreadthFirst”
“DepthFirst”
peakStartTime 高峰期的开始时间。 时间
rampDownCapacityThresholdPct 下降周期的容量阈值。 int

约束:
最小值 = 1
最大值 = 100
rampDownForceLogoffUsers 应从主机强制注销用户。 布尔
rampDownLoadBalancing算法 负载均衡算法的渐变周期。 “BreadthFirst”
“DepthFirst”
rampDownMinimumHostsPct 下降周期的最小主机百分比。 int

约束:
最小值 = 0
最大值 = 100
rampDownNotificationMessage 在渐变期间为用户发送通知消息。 字符串
rampDownStartTime 渐变期的开始时间。 时间
rampDownStopHosts当 指定何时在斜坡下降期间停止主机。 “ZeroActiveSessions”
“ZeroSessions”
rampDownWaitTimeMinutes 等待停止主机在坡道下降期间所等待的分钟数。 整数 (int)
rampUpCapacityThresholdPct 增加周期的容量阈值。 int

约束:
最小值 = 1
最大值 = 100
rampUpLoadBalancing算法 负载均衡算法用于增加周期。 “BreadthFirst”
“DepthFirst”
rampUpMinimumHostsPct 增加期间的最低主机百分比。 int

约束:
最小值 = 0
最大值 = 100
rampUpStartTime 加速周期的开始时间。 时间

时间

名字 描述 价值
小时 小时。 int

约束:
最小值 = 0
最大值 = 23 (必需)
分钟 分钟。 int

约束:
最小值 = 0
最大值 = 59 (必需)

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署 scalingPlans 资源类型:

  • 资源组 关于每个API版本中变更属性的列表,请参见 更改日志。

用法示例

Azure 验证模块

以下 Azure 验证模块 可用于部署此资源类型。

模块 描述
Azure 虚拟桌面(AVD)缩放计划 适用于 Azure 虚拟桌面 (AVD) 缩放计划的 AVM 资源模块

资源格式

若要创建 Microsoft.DesktopVirtualization/scalingPlans 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DesktopVirtualization/scalingPlans@2023-09-05"
  name = "string"
  parent_id = "string"
  identity {
    type = "string"
    identity_ids = [
      "string"
    ]
  }
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    kind = "string"
    managedBy = "string"
    plan = {
      name = "string"
      product = "string"
      promotionCode = "string"
      publisher = "string"
      version = "string"
    }
    properties = {
      description = "string"
      exclusionTag = "string"
      friendlyName = "string"
      hostPoolReferences = [
        {
          hostPoolArmPath = "string"
          scalingPlanEnabled = bool
        }
      ]
      hostPoolType = "string"
      schedules = [
        {
          daysOfWeek = [
            "string"
          ]
          name = "string"
          offPeakLoadBalancingAlgorithm = "string"
          offPeakStartTime = {
            hour = int
            minute = int
          }
          peakLoadBalancingAlgorithm = "string"
          peakStartTime = {
            hour = int
            minute = int
          }
          rampDownCapacityThresholdPct = int
          rampDownForceLogoffUsers = bool
          rampDownLoadBalancingAlgorithm = "string"
          rampDownMinimumHostsPct = int
          rampDownNotificationMessage = "string"
          rampDownStartTime = {
            hour = int
            minute = int
          }
          rampDownStopHostsWhen = "string"
          rampDownWaitTimeMinutes = int
          rampUpCapacityThresholdPct = int
          rampUpLoadBalancingAlgorithm = "string"
          rampUpMinimumHostsPct = int
          rampUpStartTime = {
            hour = int
            minute = int
          }
        }
      ]
      timeZone = "string"
    }
    sku = {
      capacity = int
      family = "string"
      name = "string"
      size = "string"
      tier = "string"
    }
  }
}

属性值

Microsoft.DesktopVirtualization/scalingPlans

名字 描述 价值
标识 ResourceModelWithAllowedPropertySetIdentity
类 门户/工具等用于为相同类型的资源呈现不同的 UX 体验的元数据;例如,ApiApps 是一种 Microsoft.Web/sites 类型。 如果受支持,资源提供程序必须验证并保留此值。 字符串

约束:
图案 = ^[-\w\._,\(\)]+$
位置 资源所在的地理位置 字符串
managedBy 管理此资源的资源的完全限定资源 ID。 指示此资源是否由另一个 Azure 资源管理。 如果存在,则完全模式部署不会删除资源(如果从模板中删除,因为它由另一个资源管理)。 字符串
名字 资源名称 字符串

约束:
最小长度 = 3
最大长度 = 64 (必需)
计划 ResourceModelWithAllowedPropertySetPlan
性能 缩放计划的详细属性。 ScalingPlanProperties (必需)
sku ResourceModelWithAllowedPropertySetSku
标签 资源标记 标记名称和值的字典。
类型 资源类型 “Microsoft.DesktopVirtualization/scalingPlans@2023-09-05”

ResourceModelWithAllowedPropertySetIdentity

名字 描述 价值
类型 标识类型。 “SystemAssigned”

ResourceModelWithAllowedPropertySetPlan

名字 描述 价值
名字 正在采购的第三方项目的用户定义的名称。 string (必需)
产品 正在采购的第三方项目。 例如 NewRelic。 产品映射到在数据市场载入时为项目指定的 OfferID。 string (必需)
促销代码 发布者为上述产品/项目提供数据市场中预配的促销代码。 字符串
发布服务器 正在购买的第三方项目的发布者。 例如 NewRelic string (必需)
版本 所需产品/项目的版本。 字符串

ResourceModelWithAllowedPropertySetSku

名字 描述 价值
产能 如果 SKU 支持横向扩展/缩减,则应包含容量整数。 如果资源无法横向扩展/缩小,则可能会省略此范围。 整数 (int)
家庭 如果服务具有不同代的硬件(对于同一 SKU,则可以在此处捕获)。 字符串
名字 SKU 的名称。 例 - P3。 它通常是字母+数字代码 string (必需)
大小 SKU 大小。 当名称字段是层和其他一些值的组合时,这将是独立的代码。 字符串
分层 如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。 “Basic”
“Free”
“Premium”
“Standard”

ResourceModelWithAllowedPropertySetTags

名字 描述 价值

ScalingHostPoolReference

名字 描述 价值
hostPoolArmPath 引用的 hostpool 的 Arm 路径。 字符串
scalingPlanEnabled 已启用 是否为此主机池启用了缩放计划。 布尔

ScalingPlanProperties

名字 描述 价值
描述 缩放计划的说明。 字符串
exclusion标签 缩放计划的排除标记。 字符串
友好名称 缩放计划的用户友好名称。 字符串
hostPool引用 ScalingHostPoolReference 定义列表。 ScalingHostPoolReference[]
hostPoolType (主机池类型) 适用于桌面的 HostPool 类型。 “Pooled”
附表 ScalingPlanPooledSchedule 定义的列表。 ScalingSchedule[]
时区 缩放计划的时区。 string (必需)

ScalingSchedule (缩放计划)

名字 描述 价值
周的天数 此计划处于活动状态的一周中的天数集。 包含任一项的字符串数组:
“Friday”
“Monday”
“Saturday”
“星期日”
“星期四”
“Tuesday”
“Wednesday”
名字 ScalingPlanPooledSchedule 的名称。 字符串
offPeakLoadBalancing算法 负载均衡算法用于非高峰期。 “BreadthFirst”
“DepthFirst”
关闭峰值开始时间 非高峰期的开始时间。 时间
peakLoadBalancing算法 高峰期的负载均衡算法。 “BreadthFirst”
“DepthFirst”
peakStartTime 高峰期的开始时间。 时间
rampDownCapacityThresholdPct 下降周期的容量阈值。 int

约束:
最小值 = 1
最大值 = 100
rampDownForceLogoffUsers 应从主机强制注销用户。 布尔
rampDownLoadBalancing算法 负载均衡算法的渐变周期。 “BreadthFirst”
“DepthFirst”
rampDownMinimumHostsPct 下降周期的最小主机百分比。 int

约束:
最小值 = 0
最大值 = 100
rampDownNotificationMessage 在渐变期间为用户发送通知消息。 字符串
rampDownStartTime 渐变期的开始时间。 时间
rampDownStopHosts当 指定何时在斜坡下降期间停止主机。 “ZeroActiveSessions”
“ZeroSessions”
rampDownWaitTimeMinutes 等待停止主机在坡道下降期间所等待的分钟数。 整数 (int)
rampUpCapacityThresholdPct 增加周期的容量阈值。 int

约束:
最小值 = 1
最大值 = 100
rampUpLoadBalancing算法 负载均衡算法用于增加周期。 “BreadthFirst”
“DepthFirst”
rampUpMinimumHostsPct 增加期间的最低主机百分比。 int

约束:
最小值 = 0
最大值 = 100
rampUpStartTime 加速周期的开始时间。 时间

时间

名字 描述 价值
小时 小时。 int

约束:
最小值 = 0
最大值 = 23 (必需)
分钟 分钟。 int

约束:
最小值 = 0
最大值 = 59 (必需)