Configures the auto scaling settings of a cluster.
Operation description
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:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is 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 |
---|---|---|---|---|
ehpc:SetAutoScaleConfig | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. | ehpc-hz-FYUr32**** |
EnableAutoGrow | boolean | No | Specifies whether to enable auto scale-out. Valid values:
Default value: false. | false |
EnableAutoShrink | boolean | No | Specifies whether to enable auto scale-in. Valid values:
Default value: false. | false |
GrowIntervalInMinutes | integer | No | The interval between two consecutive rounds of scale-out. Unit: minutes. Valid values: 2 to 10. Default value: 2. Note
An interval may exist during multiple rounds of a scale-out task or between two consecutive scale-out tasks.
| 2 |
ShrinkIntervalInMinutes | integer | No | The interval between two consecutive rounds of scale-in. Unit: minutes. Valid values: 2 to 10. Default value: 2. | 2 |
ShrinkIdleTimes | integer | No | The number of consecutive times that a compute node is idle during the resource scale-in check. Valid values: 2 to 5. Default value: 3. If the parameter is set to 3, a compute node is idle more than three consecutive times. In this case, the node is released. If a compute node is idle for longer than 6 minutes continuously, it is released by default. This is because the default value of the ShrinkIntervalInMinutes parameter is 2. | 3 |
GrowTimeoutInMinutes | integer | No | The scale-out timeout period. Unit: minutes. Valid values: 10 to 60. Default value: 20. If the scale-out timeout period has been reached but the scale-out nodes still do not reach the Running state, the system releases them. | 20 |
ExtraNodesGrowRatio | integer | No | The percentage of extra compute nodes. Valid values: 0 to 100. Default value: 0. If you need to add 100 compute nodes and the value of the ExtraNodesGrowRatio parameter is 2, 102 compute nodes are added. | 0 |
GrowRatio | integer | No | The percentage of each round of a scale-out task. Valid values: 1 to 100. Default value: 100. If you set GrowRatio to 50, the scale-out has two rounds. Each round completes half of the scale-out. | 50 |
MaxNodesInCluster | integer | Yes | The maximum number of compute nodes that can be added to the cluster. Valid values: 0 to 500. Default value: 100. | 100 |
ExcludeNodes | string | No | The compute nodes that are excluded from auto scaling tasks. Separate multiple compute nodes with commas (,). If you want to retain a compute node, you can specify the node as an additional node to retain the node when it is idle. | i-bp19lgqwxb4206t5****,i-bp1g4hvzs9pywrhb**** |
SpotStrategy | string | No | The preemption policy of the compute nodes. Valid values:
Default value: NoSpot. | SpotWithPriceLimit |
SpotPriceLimit | float | No | The maximum hourly price of the compute nodes. The value can be accurate to three decimal places. The parameter takes effect only when | 0.062 |
ImageId | string | No | The IDs of the images. Note
| centos_7_03_64_20G_alibase_201708**** |
Queues | object [] | No | The information about the queue. | |
QueueImageId | string | No | The image ID of the queue where the scale-out is performed. Valid values of N: 1 to 8. Note
| centos_7_03_64_20G_alibase_201708**** |
SystemDiskCategory | string | No | The category of the system disk specified for the compute nodes that are added to the queue. Valid values:
Valid values of N: 1 to 8. Default value: cloud_efficiency. | cloud_efficiency |
InstanceType | string | No | The instance type of the compute nodes that are automatically added to the queue. Valid values of N: 1 to 8. | ecs.n1.medium |
HostNameSuffix | string | No | The hostname suffix of the host that is used to perform scale-out for the queue. You can manage nodes that have a specified hostname suffix. Valid values of N: 1 to 8. | 000 |
SpotStrategy | string | No | The preemption policy of the compute node that is automatically added to the queue. Valid values of N: 1 to 8. Valid values:
Default value: NoSpot. | NoSpot |
HostNamePrefix | string | No | The hostname prefix of the host that is used to perform scale-out for the queue. You can manage compute nodes that have a specified hostname prefix. Valid values of N: 1 to 8. | compute |
MinNodesInQueue | integer | No | The minimum number of compute nodes that can be removed from the queue. Valid values: 0 to 50. Valid values of N: 1 to 8. Default value: 0. | 0 |
SystemDiskSize | integer | No | The size of the system disk specified for the compute nodes that are added to the queue. Unit: GB. Valid values: 40 to 500. Valid values of N: 1 to 8. Default value: 40. | 40 |
MaxNodesInQueue | integer | No | The maximum number of compute nodes that can be added to the queue. Valid values: 0 to 500. Valid values of N: 1 to 8. Default value: 100. | 30 |
EnableAutoShrink | boolean | No | Specifies whether the queue enables auto scale-in. Valid values:
Valid values of N: 1 to 8. Default value: false. | false |
QueueName | string | No | The name of the queue. You can specify 1 to 8 names. | cluster1 |
EnableAutoGrow | boolean | No | Specifies whether the queue enables auto scale-out. Valid values:
Valid values of N: 1 to 8. Default value: false. | false |
SystemDiskLevel | string | No | The performance level of the system disk specified for the compute nodes that are added to the queue. Valid values:
Valid values of N: 1 to 8. Default value: PL1. | PL1 |
SpotPriceLimit | float | No | The maximum hourly price of the compute nodes that are automatically added to the queue. The value can be accurate to three decimal places. The parameter takes effect only when Valid values of N: 1 to 8. | 0.662 |
InstanceTypes | object [] | No | The instance types of the nodes in the queue. | |
VSwitchId | string | No | The vSwitch ID of the compute nodes that are automatically added to the queue. You can specify 1 to 8 IDs. The vSwitch IDs of N compute nodes in the queue can be set at the same time when auto scaling is performed in the queue. Valid values of N: 0 to 500. | vsw-bp1lfcjbfb099rrjn**** |
ZoneId | string | No | The ID of the zone that compute nodes automatically added to the queue belong. You can specify 1 to 8 IDs. The zone IDs of N compute nodes in the queue can be set at the same time when auto scaling is performed in the queue. Valid values of N: 0 to 500. | cn-hangzhou-b |
SpotPriceLimit | float | No | The maximum hourly price of the compute nodes that are automatically added to the queue. The value can be accurate to three decimal places. The parameter takes effect only when You can specify the maximum hourly price for 1 to 8 compute nodes. The maximum hourly prices of N compute nodes in the queue can be set at the same time when auto scaling is performed in the queue. Valid values of N: 0 to 500. | 0.660 |
InstanceType | string | No | The instance type of the compute nodes that are automatically added to the queue. You can specify the specification for 1 to 8 nodes. The instance types of N compute nodes in the queue can be set at the same time when auto scaling is performed in the queue. Valid values of N: 0 to 500. | ecs.n1.tiny |
SpotStrategy | string | No | The preemption policy for the compute node that is automatically added to the queue. Valid values:
Default value: NoSpot. You can specify the preemption policy for 1 to 8 compute nodes. The preemption policies of N compute nodes in the queue can be set at the same time when auto scaling is performed in the queue. Valid values of N: 0 to 500. | SpotWithPriceLimit |
SpotDuration | integer | No | The protection period of the preemptible instance. Unit: hours. Valid values: 0 to 1. A value of 0 means that no protection period is specified. Default value: 1. | 0 |
SpotInterruptionBehavior | string | No | The interruption mode of the preemptible instance. The value can only be Terminate, which indicates that the instance is released. | Terminate |
DataDisks | object [] | No | The list of data disks. | |
DataDiskSize | integer | No | The size of the data disk. Unit: GB. Valid values: 40 to 500. Default value: 40. Valid values of N: 0 to 16. | 40 |
DataDiskCategory | string | No | The category of the data disk. Valid values:
Default value: cloud_efficiency. Valid values of N: 0 to 16. | cloud_efficiency |
DataDiskDeleteWithInstance | boolean | No | Specifies whether the data disk is released when the node is released. Valid values:
Default value: true. Valid values of N: 0 to 16. | true |
DataDiskPerformanceLevel | string | No | The performance level of the ESSD used as the data disk. The parameter takes effect only when the Queues.N.DataDisks.N.DataDiskCategory parameter is set to cloud_essd. Valid values:
Default value: PL1. Valid values of N: 0 to 16. | PL1 |
DataDiskEncrypted | boolean | No | Specifies whether to encrypt the data disk. Valid values:
Default value: false. Valid values of N: 0 to 16. | false |
DataDiskKMSKeyId | string | No | The Key Management Service (KMS) key ID of the data disk. Valid values of N: 0 to 16. | 0e478b7a-4262-4802-b8cb-00d3fb40826X |
MaxNodesPerCycle | long | No | The maximum number of compute nodes that can be added in each round of scale-out. Valid values: 0 to 99. Default value: 0. | 20 |
MinNodesPerCycle | long | No | The minimum number of compute nodes that can be added in each round of scale-out. Valid values: 1 to 99 Default value: 1. If the number of compute nodes that you want to add in a round is less than the value of this property, the system automatically changes the value of this property to the number of compute nodes that you want to add in a round. This helps ensure that compute nodes can be added as expected. Note
The configuration takes effect only for the minimum compute nodes that can be added in the current round.
| 5 |
AutoMinNodesPerCycle | boolean | No | Specifies whether to automatically specify the minimum number of compute nodes that can be added in each round of scale-out. If you set this parameter to true, the minimum number of nodes for each scale-out is equal to the number of nodes required by the job. The maximum number is 99. | false |
SortedByInventory | boolean | No | Specifies whether the instances are unordered. Valid values:
Note
If you set this parameter to true, the system selects instance types in descending order of the number of instances in stock during auto scaling.
| false |
ComputeEnableHt | boolean | No | Specifies whether to enable hyper-threading for the ECS instance that is used as the compute node. Note
You can only disable hyper-threading for some instance types. The hyper-threading is enabled for ECS instances by default. For more information, see Specify and view CPU options.
| true |
DnsConfig | string | No | The configurations of DNS. | "{\"DnsType\":\"PrivateZone\",\"DnsName\":\"xxxxx\"}" |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "04F0F334-13358736C-A1D7-6C044FE7****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
403 | InvalidOpt | The specified operation is invalid. Please try again later. If the problem still exists, submit a ticket. | - |
403 | TooManyComputes | The number of computing nodes exceeds the quota. | The number of computing nodes exceeds the quota. |
404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
404 | ImageNotFound | The specified image does not exist. | The specified image does not exist. Please verify the parameter. |
406 | DbError | A database service error occurred. | Database request failed. |
407 | NotAuthorized | You are not authorized by RAM for this request. | The request is not authorized by RAM. |
500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-08-11 | The Error code has changed | see changesets | ||||||||||||||||||||
| ||||||||||||||||||||||
2023-07-13 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||||||||||
| ||||||||||||||||||||||
2023-05-23 | The Error code has changed | see changesets | ||||||||||||||||||||
| ||||||||||||||||||||||
2023-03-28 | The Error code has changed | see changesets | ||||||||||||||||||||
| ||||||||||||||||||||||
2023-03-28 | The Error code has changed | see changesets | ||||||||||||||||||||
| ||||||||||||||||||||||
2023-03-15 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||||||||||
| ||||||||||||||||||||||
2021-12-23 | The Error code has changed | see changesets | ||||||||||||||||||||
|