Adds pay-as-you-go or preemptible compute nodes to a cluster.
Operation description
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ehpc:ApplyNodes |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The ID of the E-HPC cluster. Call ListClusters to query the cluster ID. |
ehpc-hz-FYUr32**** |
| ImageId |
string |
No |
The image ID of the compute nodes. Takes effect only when TargetImageId is not specified. Call ListImages or ListCustomImages to query image IDs. Note
When adding multiple compute nodes, TargetImageId takes effect only on nodes where it is specified. |
centos_7_06_64_20G_alibase_20190711.vhd |
| ComputeSpotStrategy |
string |
No |
The preemption policy of the compute nodes. Valid values:
Default value: NoSpot. |
NoSpot |
| ComputeSpotPriceLimit |
number |
No |
The maximum hourly price of the compute nodes. A floating-point number with up to three decimal places. Takes effect only when ComputeSpotStrategy is set to SpotWithPriceLimit. If both ComputeSpotPriceLimit and InstanceTypeModel.N.MaxPrice are specified, the smaller value is used. |
0.68 |
| SystemDiskType |
string |
No |
The type of the system disk. Valid values:
|
cloud_ssd |
| SystemDiskSize |
integer |
No |
The size of the system disk. Unit: GB. Valid values: 40 to 500. Default value: 40. |
40 |
| HostNamePrefix |
string |
No |
The prefix of the hostname. |
compute |
| HostNameSuffix |
string |
No |
The suffix of the hostname. |
01 |
| AllocatePublicAddress |
boolean |
No |
Whether to allocate a public IP address to the compute nodes. Valid values:
Default value: false. |
false |
| InternetChargeType |
string |
No |
The billing method of the elastic IP address (EIP). Valid values:
|
PayByTraffic |
| InternetMaxBandWidthIn |
integer |
No |
The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:
|
10 |
| InternetMaxBandWidthOut |
integer |
No |
The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. Default value: 0. |
10 |
| Cores |
integer |
No |
The number of vCPUs. Required when ResourceAmountType is set to Cores. Set Cores and Memory to filter instance types by vCPU and memory. Results are sorted by price, and the lowest-priced instances are created first. |
2 |
| Memory |
integer |
No |
The memory size. Required when ResourceAmountType is set to Cores. Unit: GB. Set Cores and Memory to filter instance types by vCPU and memory. Results are sorted by price, and the lowest-priced instances are created first. |
16 |
| InstanceFamilyLevel |
string |
No |
The level of the instance family. Takes effect only when Cores and Memory are specified. Valid values:
Default value: EnterpriseLevel. |
EntryLevel |
| TargetCapacity |
integer |
Yes |
The amount of resources to add. The range depends on ResourceAmountType:
|
20 |
| ResourceAmountType |
string |
No |
The type of resources to add. Valid values:
Default value: Instances. |
Instances |
| PriorityStrategy |
string |
No |
The scheduling policy for preemptible nodes. Valid values:
|
LowPriceResourcePlanning |
| StrictSatisfiedTargetCapacity |
boolean |
No |
Whether to strictly meet the TargetCapacity requirement. Valid values:
Default value: true. |
true |
| SystemDiskLevel |
string |
No |
The performance level of the ESSD that you want to use as the system disk. Valid values:
Default value: PL0. ESSDs. |
PL0 |
| StrictResourceProvision |
boolean |
No |
Whether to strictly meet the TargetCapacity requirement. Takes effect only when StrictSatisfiedTargetCapacity is set to true. Valid values:
Default value: false. |
false |
| Round |
integer |
No |
The total number of batches for node creation. Valid values: 1 to 10. Default value: 1. |
1 |
| Interval |
integer |
No |
The interval between consecutive batches. Valid values: 60 to 600. Unit: seconds. Default value: 60. |
60 |
| ZoneInfos |
array<object> |
Yes |
The zone details. You can specify up to 10 zones. |
|
|
object |
No |
|||
| VSwitchId |
string |
No |
The ID of the vSwitch. Valid values of N: 1 to 10. |
vsw-bp1e47optm9g58zcu**** |
| ZoneId |
string |
No |
The ID of the zone to which the node belongs. Valid values of N: 1 to 10. Note
Each zone ID must be unique. |
cn-hangzhou-b |
| InstanceTypeModel |
array<object> |
No |
The preemptible instance details. |
|
|
object |
No |
|||
| MaxPrice |
number |
No |
The maximum hourly price for the preemptible node. A floating-point number with up to three decimal places. Takes effect only when ComputeSpotStrategy is set to SpotWithPriceLimit. Valid values of N: 1 to 10. |
0.034 |
| TargetImageId |
string |
No |
The image ID of the compute node. You must select a Windows image. Valid values of N: 1 to 10. |
win2016_1607_x64_dtc_zh-cn_40G_alibase_20210516.vhd |
| InstanceType |
string |
No |
The instance type of the compute node. Defaults to the instance type specified at cluster creation or the last time compute nodes were added. Valid values of N: 1 to 10. |
ecs.n1.tiny |
| Tag |
array<object> |
No |
The tags added to the nodes. |
|
|
object |
No |
|||
| Key |
string |
No |
The tag key. Cannot be empty. Maximum length: 128 characters. Cannot start with aliyun or acs: or contain http:// or https://. Valid values of N: 1 to 20. |
TestKey |
| Value |
string |
No |
The tag value. Can be empty. Maximum length: 128 characters. Cannot start with acs: or contain http:// or https://. Valid values of N: 1 to 20. |
TestValue |
| JobQueue |
string |
No |
The queue to which the compute nodes are added. Call ListQueues to query queue names. |
workq |
| UserData |
string |
No |
The user data of the instance. Must be Base64-encoded. Maximum raw data size: 16 KB. Linux supports shell scripts. Windows supports bat and PowerShell scripts and requires [bat] or [powershell] as the first line before encoding. Note
Do not pass confidential information such as passwords or private keys in plaintext as user data. UserData values are not encrypted during API transmission. Encrypt and Base64-encode confidential data, then decode and decrypt it inside the instance. |
ZWNobyBoZWxsbyBlY3Mh |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The task ID. |
B745C159-3155-4B94-95D0-4B73D4D2**** |
| SatisfiedAmount |
integer |
The number of compute nodes created. |
10 |
| TaskId |
string |
The request ID. |
B745C159-3155-4B94-95D0-4B73D4D2**** |
| Detail |
string |
The detailed result. |
Resources Application is satisfied. Creating... |
| InstanceIds |
object |
||
| InstanceId |
array |
The instance IDs. Note
ApplyNodes is an asynchronous operation. A response is returned before ECS instances are created, so this value is null. Call ListNodes to query ECS instance IDs. |
|
|
string |
The instance IDs. Note
ApplyNodes is an asynchronous operation. A response is returned before ECS instances are created, so this value is null. Call ListNodes to query ECS instance IDs. |
null |
Examples
Success response
JSON format
{
"RequestId": "B745C159-3155-4B94-95D0-4B73D4D2****",
"SatisfiedAmount": 10,
"TaskId": "B745C159-3155-4B94-95D0-4B73D4D2****",
"Detail": "Resources Application is satisfied. Creating...",
"InstanceIds": {
"InstanceId": [
"null"
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
| 400 | NotEnabled | You have not enabled this service | You have not enabled this service |
| 400 | InDebt | Your account has overdue payments. | Your account has overdue payments. |
| 400 | InvalidVswitch | The vSwitch parameter is invalid, or the number of available IP addresses is insufficient. | The vSwitch parameter is invalid, or the number of available IP addresses is insufficient. |
| 400 | InvalidImage | The image ID is invalid. | The image ID is invalid. |
| 400 | InvaildSystemDiskSize | The system disk size must be greater than or equal to image size. | The system disk size must be greater than or equal to image size. |
| 400 | InvalidInstanceType.NotSupported | The instance type is invalid. | The instance type is invalid. |
| 400 | InvalidZoneId.ValueNotSupported | The specified ZoneId is invalid. | The specified zone ID is invalid. |
| 500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
| 403 | TooManyComputes | The number of computing nodes exceeds the quota. | The number of computing nodes exceeds the quota. |
| 403 | TooManyLogins | The maximum number of logged on nodes is exceeded. | The maximum number of logged on nodes is exceeded. The default maximum value is 2. |
| 403 | TooManyScc | The maximum number of SCC instances is exceeded. | The maximum number of SCC instances is exceeded. The default maximum value is 15. |
| 403 | InvalidClusterStatus | The operation failed due to invalid cluster status. | The cluster status does not support the operation. |
| 403 | ConflictOpt | A conflicting operation is running. | A conflicting operation is running. Please try again later. |
| 403 | ImageNotSupported | The specified image is not supported. | The specified image does not exist. Change the image and try again. |
| 403 | InvalidCapacityNum.ValueNotSupported | The specified TargetCapacity is invalid. | The specified target capacity is invalid. |
| 403 | RecommendEmpty.InstanceTypeSoldOut | The resource is out of stock. | The resource is out of stock. |
| 403 | ResourceTargetAmount.NotSatisfied | The resource application is not satisfied. | The resource application is not satisfied. |
| 403 | RecommendEmpty.PriceNotSatisfied | The price limit is not satisfied. | The price limit is not satisfied. |
| 403 | QuotaExceed.PayasyougoInstance | The pay-as-you-go instance exceeds the quota. | The pay-as-you-go instance exceeds the quota. |
| 403 | RecommendEmpty.InstanceTypeNoStock | The instanceTypes are out of usage. | The instance type is unavailable. |
| 403 | RecommendEmpty.InstanceTypeNotAuthorized | The recommend instanceTypes are not authorized. | |
| 403 | InvalidOpt | The specified operation is invalid. Please try again later. | The operation is unknown. Please check arguments and try again later. |
| 404 | ImageNotFound | The specified image does not exist. | The specified image does not exist. Please verify the parameter. |
| 404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
| 404 | VolumeNotFound | The specified volume does not exist. | The specified storage does not exist. Please verify the parameter. |
| 404 | ManagerNotFound | The manager nodes do not exist or their status is abnormal. | The manager nodes do not exist or their status is abnormal. |
| 404 | ObjectNotFound | The specified object is not found. | The specified object does not exist. Please verify the parameter. |
| 404 | VswitchNotFound | The specified vSwitch does not exist. | The specified vSwitch does not exist. |
| 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. |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API call error. %s |
| 406 | EipError | The EIP API request failed. | EIP API request failed. |
| 406 | DbError | A database service error occurred. | Database request failed. |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | Alibaba Cloud product error. %s |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | The request is not authorized by RAM. |
| 409 | PartFailure | Part of the batch operation failed. | Part of the batch operation failed. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.