通过


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

Scaling Plan Pooled Schedules - Create

创建或更新 ScalingPlanPooledSchedule。

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

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 此名称不区分大小写。

scalingPlanName
path True

string

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

扩展计划的名称。

scalingPlanScheduleName
path True

string

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

ScalingPlanSchedule 的名称

subscriptionId
path True

string (uuid)

目标订阅的 ID。 该值必须是 UUID。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

请求正文

名称 类型 说明
properties.daysOfWeek

DayOfWeek[]

此计划处于活动状态的一周中的天数集。

properties.offPeakLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

负载均衡算法用于非高峰期。

properties.offPeakStartTime

Time

非高峰期的开始时间。

properties.peakLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

高峰期的负载均衡算法。

properties.peakStartTime

Time

高峰期的开始时间。

properties.rampDownCapacityThresholdPct

integer (int32)

minimum: 1
maximum: 100

下降周期的容量阈值。

properties.rampDownForceLogoffUsers

boolean

应从主机强制注销用户。

properties.rampDownLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

负载均衡算法的渐变周期。

properties.rampDownMinimumHostsPct

integer (int32)

minimum: 0
maximum: 100

下降周期的最小主机百分比。

properties.rampDownNotificationMessage

string

在渐变期间为用户发送通知消息。

properties.rampDownStartTime

Time

渐变期的开始时间。

properties.rampDownStopHostsWhen

StopHostsWhen

指定何时在斜坡下降期间停止主机。

properties.rampDownWaitTimeMinutes

integer (int32)

等待停止主机在坡道下降期间所等待的分钟数。

properties.rampUpCapacityThresholdPct

integer (int32)

minimum: 1
maximum: 100

增加周期的容量阈值。

properties.rampUpLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

负载均衡算法用于增加周期。

properties.rampUpMinimumHostsPct

integer (int32)

minimum: 0
maximum: 100

增加期间的最低主机百分比。

properties.rampUpStartTime

Time

加速周期的开始时间。

响应

名称 类型 说明
200 OK

ScalingPlanPooledSchedule

已成功更新 ScalingPlanPooledSchedule。

201 Created

ScalingPlanPooledSchedule

成功创建了ScalingPlanPooledSchedule。

Other Status Codes

CloudError

描述作失败原因的自动化错误响应。

示例

ScalingPlanPooledSchedules_Create

示例请求

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"
  }
}

示例响应

{
  "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"
  }
}

定义

名称 说明
CloudError

云端错误对象。

CloudErrorProperties

云错误对象属性。

createdByType

创建资源的标识的类型。

DayOfWeek

一周中的一天。

ScalingPlanPooledSchedule

表示 ScalingPlanPooledSchedule 定义。

SessionHostLoadBalancingAlgorithm

负载均衡算法用于增加周期。

StopHostsWhen

指定何时在斜坡下降期间停止主机。

systemData

与创建和上次修改资源相关的元数据。

Time

发生缩放作的时间。

CloudError

云端错误对象。

名称 类型 说明
error

CloudErrorProperties

云错误对象属性。

CloudErrorProperties

云错误对象属性。

名称 类型 说明
code

string

错误代码

message

string

指示操作失败的原因的错误消息。

createdByType

创建资源的标识的类型。

说明
User
Application
ManagedIdentity
Key

DayOfWeek

一周中的一天。

说明
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday

ScalingPlanPooledSchedule

表示 ScalingPlanPooledSchedule 定义。

名称 类型 说明
id

string (arm-id)

资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

资源的名称

properties.daysOfWeek

DayOfWeek[]

此计划处于活动状态的一周中的天数集。

properties.offPeakLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

负载均衡算法用于非高峰期。

properties.offPeakStartTime

Time

非高峰期的开始时间。

properties.peakLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

高峰期的负载均衡算法。

properties.peakStartTime

Time

高峰期的开始时间。

properties.rampDownCapacityThresholdPct

integer (int32)

minimum: 1
maximum: 100

下降周期的容量阈值。

properties.rampDownForceLogoffUsers

boolean

应从主机强制注销用户。

properties.rampDownLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

负载均衡算法的渐变周期。

properties.rampDownMinimumHostsPct

integer (int32)

minimum: 0
maximum: 100

下降周期的最小主机百分比。

properties.rampDownNotificationMessage

string

在渐变期间为用户发送通知消息。

properties.rampDownStartTime

Time

渐变期的开始时间。

properties.rampDownStopHostsWhen

StopHostsWhen

指定何时在斜坡下降期间停止主机。

properties.rampDownWaitTimeMinutes

integer (int32)

等待停止主机在坡道下降期间所等待的分钟数。

properties.rampUpCapacityThresholdPct

integer (int32)

minimum: 1
maximum: 100

增加周期的容量阈值。

properties.rampUpLoadBalancingAlgorithm

SessionHostLoadBalancingAlgorithm

负载均衡算法用于增加周期。

properties.rampUpMinimumHostsPct

integer (int32)

minimum: 0
maximum: 100

增加期间的最低主机百分比。

properties.rampUpStartTime

Time

加速周期的开始时间。

systemData

systemData

与创建和上次修改资源相关的元数据。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

SessionHostLoadBalancingAlgorithm

负载均衡算法用于增加周期。

说明
BreadthFirst
DepthFirst

StopHostsWhen

指定何时在斜坡下降期间停止主机。

说明
ZeroSessions
ZeroActiveSessions

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。

Time

发生缩放作的时间。

名称 类型 说明
hour

integer (int32)

minimum: 0
maximum: 23

小时。

minute

integer (int32)

minimum: 0
maximum: 59

分钟。