Changes the scaling policy of a delivery group. The following scaling policies are supported: fixed resource number, scheduled scaling, and auto scaling.
Operation description
You can select one of the following scaling policies for cloud app resources:
- No scaling: Resources are not scaled.
- Auto scaling: Resources are automatically scaled based on the number of connected sessions and the duration during which no session is connected.
- Scheduled scaling: Resources are scaled during specific periods of time on specific dates.
Before you call this operation, make sure that you fully understand the billing methods and prices of App Streaming.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| appstreaming:ModifyNodePoolAttribute | update | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ProductType | string | No | The product type. Valid value:
| CloudApp |
| NodePoolStrategy | object | No | The auto scaling policy used by the delivery group. | |
| StrategyType | string | No | The scaling mode. Note
Valid values:
| NODE_FIXED |
| NodeAmount | integer | No | The number of resources to purchase. Valid values: 1 to 100. Note
| 1 |
| MaxScalingAmount | integer | No | The maximum number of resources that can be created for scale-out. This parameter is required only if you set | 10 |
| MaxIdleAppInstanceAmount | integer | No | The maximum number of idle sessions. After you specify a value for this parameter, auto scaling is triggered only if the number of idle sessions in the delivery group is smaller than the specified value and the session usage exceeds the value specified for | 3 |
| ScalingStep | integer | No | The number of resources that are created each time resources are scaled out. Valid values: 1 to 10. This parameter is required only if you set | 2 |
| ScalingUsageThreshold | string | No | The upper limit of session usage. If the session usage exceeds the specified upper limit, auto scaling is automatically triggered. The session usage is calculated by using the following formula: | 85 |
| ScalingDownAfterIdleMinutes | integer | No | The maximum retention period of a resource to which no session is connected. If no session is connected to a resource, the resource is automatically scaled in after the specified retention period elapses. Valid values: 5 to 120. Default value: 5. Unit: minutes. If one of the following situations occurs, the resource is not scaled in.
| 5 |
| StrategyEnableDate | string | No | The effective date of the scaling policy. Format: yyyy-MM-dd. The date must be the same as or later than the current date. This parameter is required only if you set | 2023-01-05 |
| StrategyDisableDate | string | No | The expiration date of the scaling policy. Format: yyyy-MM-dd. The interval between the expiration date and the effective date must be from 7 days to 1 year. This parameter is required only if you set | 2023-01-19 |
| WarmUp | boolean | No | Specifies whether to enable the warmup policy for resources. This parameter is required only if you set | false |
| RecurrenceSchedules | array<object> | No | The intervals at which the scaling policy is executed. This parameter is required only if you set | |
| object | No | The interval at which the scaling policy is executed. | ||
| RecurrenceType | string | No | The schedule type of the scaling policy. This parameter must be configured together with Valid values:
| weekly |
| RecurrenceValues | array | No | The days of each week on which the scaling policy is executed. | |
| integer | No | The day of each week on which the scaling policy is executed. Valid values:
| 1 | |
| TimerPeriods | array<object> | No | The time periods during which the scaling policy can be executed. The time periods must meet the following requirements:
| |
| object | No | The time period during which the scaling policy can be executed. | ||
| StartTime | string | No | The beginning of the time period during which the scaling policy is executed. Format: HH:mm. | 12:00 |
| EndTime | string | No | The end of the time period during which the scaling policy is executed. Format: HH:mm. | 15:00 |
| Amount | integer | No | The number of resources. | 2 |
| BizRegionId | string | No | The ID of the region where the delivery group resides. For information about the supported regions, see Limits . Valid values:
| cn-hangzhou |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"Code": "InvalidParameter.PoolId",
"Message": "The parameter PoolId is invalid."
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-09-12 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
| 2023-03-31 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
