Adds one or more compute nodes to a cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddNodes |
The operation that you want to perform. Set the value to AddNodes. |
ClusterId | String | Yes | ehpc-hz-FYUr32**** |
The ID of the cluster. You can call the ListClusters operation to query the cluster ID. |
ImageOwnerAlias | String | No | system |
The type of the image. Valid values:
Default value: system |
ImageId | String | No | centos_7_06_64_20G_alibase_20190711.vhd |
The ID of the image that is specified for the compute nodes. The image must meet the following requirements:
You can call the ListImages and ListCustomImages operations to query the image ID. |
Count | Integer | Yes | 10 |
The number of compute nodes that you want to add. Valid values: 1 to 99. The value of this parameter is greater than that of the MinCount parameter.
|
InstanceType | String | No | ecs.n1.tiny |
The instance type of the compute nodes. The default value is the instance type that was specified when you created the cluster or the last time when you added compute nodes. |
ComputeSpotStrategy | String | No | NoSpot |
The preemption policy of the compute nodes. The parameter only takes effect when EcsChargeType is set to PostPaid. Valid values:
Default value: NoSpot |
ComputeSpotPriceLimit | String | No | 0.68 |
The maximum hourly price of the compute nodes. The value can be accurate to three decimal places. The parameter only takes effect when SpotStrategy is set to SpotWithPriceLimit. |
EcsChargeType | String | No | PostPaid |
The billing method of the compute nodes. Valid values:
Default value: PostPaid If the parameter is set to PrePaid, auto-renewal is enabled by default. After the cluster is released, auto-renewal is disabled. |
Period | Integer | No | 1 |
The duration of the subscription. The unit of the duration is specified by the PeriodUnit parameter. The parameter only takes effect when InstanceChargeType is set to PrePaid. Valid values:
Default value: 1 |
PeriodUnit | String | No | Month |
The unit of the subscription duration. Valid values:
Default value: Month |
AutoRenew | String | No | true |
Specifies whether to enable auto-renewal. The parameter takes effect only when EcsChargeType is set to PrePaid. Valid values:
Default value: true |
AutoRenewPeriod | Integer | No | 1 |
The auto-renewal period of the subscription compute nodes. The parameter takes effect when AutoRenew is set to true.
Default value: 1 |
JobQueue | String | No | workq |
The queue to which the compute nodes are added. |
CreateMode | String | No | manual |
The mode in which the compute nodes are added. Valid values:
Default value: manual |
SystemDiskType | String | No | cloud_ssd |
The type of the system disk. Valid values:
Default value: cloud_efficiency |
SystemDiskSize | Integer | No | 40 |
The size of the system disk. Unit: GiB. Valid values: 40 to 500 Default value: 40 |
ZoneId | String | No | cn-hangzhou-b |
The ID of the zone. |
VSwitchId | String | No | vsw-bp1lfcjbfb099rrjn**** |
The ID of the vSwitch. |
HostNamePrefix | String | No | compute |
The prefix of the hostname. You can specify the parameter to manage the compute nodes in an efficient manner. |
HostNameSuffix | String | No | 01 |
The suffix of the hostname. You can specify the parameter to manage the compute nodes in an efficient manner. |
ComputeEnableHt | Boolean | No | true |
Specifies whether the compute nodes support hyper-threading. Valid values:
Default value: true |
AllocatePublicAddress | Boolean | No | false |
Specifies whether to allocate a public IP address to the compute nodes. Valid values:
Default value: false |
InternetChargeType | String | No | PayByTraffic |
The billing method of the elastic IP address (EIP). Valid values:
|
InternetMaxBandWidthIn | Integer | No | 10 |
The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:
|
InternetMaxBandWidthOut | Integer | No | 10 |
The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. Default value: 0 |
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure the idempotence of a request. |
SystemDiskLevel | String | No | PL0 |
The performance level of the ESSD used as the system disk. Valid values:
Default value: PL1 For more information about ESSD performance parameters, see ESSD. |
MinCount | Integer | No | 1 |
The minimum number of the compute nodes that you want to add. Valid values: 1 to 99. The value of the parameter is less than that of the Count parameter.
Default value: 1 |
Sync | Boolean | No | false |
Specifies whether to set the API operation as a synchronous operation. Valid values:
Default value: false |
DataDisks.N.DataDiskSize | Integer | No | 40 |
The size of the data disk. Unit: GB. Valid values: 40 to 500 Default value: 40 Valid values of N: 0 to 16 |
DataDisks.N.DataDiskCategory | String | No | cloud_efficiency |
The type of the data disk. Valid values:
Default value: cloud_efficiency Valid values of N: 0 to 16 |
DataDisks.N.DataDiskDeleteWithInstance | Boolean | No | true |
Specifies whether the data disk is released when the node is released. Valid values:
Default value: true Valid values of N: 0 to 16 |
DataDisks.N.DataDiskPerformanceLevel | String | No | PL1 |
The performance level of the ESSD used as the data disk. The parameter only takes effect only when the DataDisks.N.DataDiskCategory parameter is set to cloud_essd. Valid values:
Default value: PL1 Valid values of N: 0 to 16 |
DataDisks.N.DataDiskEncrypted | Boolean | No | false |
Specifies whether to encrypt the data disk. Valid values:
Default value: false Valid values of N: 0 to 16 |
DataDisks.N.DataDiskKMSKeyId | String | No | 0e478b7a-4262-4802-b8cb-00d3fb40826X |
The KMS key ID of the data disk. Valid values of N: 0 to 16 |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TaskId | String | B745C159-3155-4B94-95D0-4B73D4D2**** |
The ID of the task. |
RequestId | String | B745C159-3155-4B94-95D0-4B73D4D2**** |
The ID of the request. |
InstanceIds | Array of String | null |
The ID of the instance. Note AddNodes is an asynchronous API operation. If a request succeeds, a response is immediately
generated before ECS instances are created. Therefore, the value of the parameter
is null. You can call the ListNodes operation to obtain the IDs of the ECS instances.
|
Examples
Sample requests
http(s)://ehpc.cn-hangzhou.aliyuncs.com/?Action=AddNodes
&ClusterId=ehpc-hz-FYUr32****
&ImageOwnerAlias=system
&ImageId=centos_7_06_64_20G_alibase_20190711.vhd
&Count=10
&InstanceType=ecs.n1.tiny
&ComputeSpotStrategy=NoSpot
&ComputeSpotPriceLimit=0.68
&EcsChargeType=PostPaid
&Period=1
&PeriodUnit=Month
&AutoRenew=true
&AutoRenewPeriod=1
&JobQueue=workq
&CreateMode=manual
&SystemDiskType=cloud_ssd
&SystemDiskSize=40
&ZoneId=cn-hangzhou-b
&VSwitchId=vsw-bp1lfcjbfb099rrjn****
&HostNamePrefix=compute
&HostNameSuffix=01
&ComputeEnableHt=true
&AllocatePublicAddress=false
&InternetChargeType=PayByTraffic
&InternetMaxBandWidthIn=10
&InternetMaxBandWidthOut=10
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&SystemDiskLevel=PL0
&MinCount=1
&Sync=false
&DataDisks=[{"DataDiskSize":40,"DataDiskCategory":"cloud_efficiency","DataDiskDeleteWithInstance":true,"DataDiskPerformanceLevel":"PL1","DataDiskEncrypted":false,"DataDiskKMSKeyId":"0e478b7a-4262-4802-b8cb-00d3fb40826X"}]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddNodesResponse>
<TaskId>B745C159-3155-4B94-95D0-4B73D4D2****</TaskId>
<RequestId>B745C159-3155-4B94-95D0-4B73D4D2****</RequestId>
<InstanceIds>
<InstanceId>null</InstanceId>
</InstanceIds>
</AddNodesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TaskId" : "B745C159-3155-4B94-95D0-4B73D4D2****",
"RequestId" : "B745C159-3155-4B94-95D0-4B73D4D2****",
"InstanceIds" : {
"InstanceId" : "null"
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | The error message returned because the following parameter is invalid: %s. |
400 | NotEnabled | You have not enabled this service | The error message returned because the service is not activated for your account. |
400 | InDebt | Your account has overdue payments. | The error message returned because your account has overdue payments. |
400 | InvaildSystemDiskSize | The system disk size must be greater than or equal to image size. | The error message returned because the size of the system disk must be greater than or equal to that of the image. |
403 | TooManyComputes | The number of computing nodes exceeds the quota. | The error message returned because the number of compute nodes has exceeded the compute node quota. |
403 | TooManyLogins | The maximum number of logged on nodes is exceeded. | The error message returned because the number of logon nodes has exceeded the logon node quota, which is two. To raise the quota, submit a ticket. |
403 | TooManyScc | The maximum number of SCC instances is exceeded. | The error message returned because the number of SCC instances has exceeded the SCC instance quota, which is 15. To raise the quota, submit a ticket. |
403 | InvalidClusterStatus | The operation failed due to invalid cluster status. | The error message returned because the operation is not supported while the cluster is in the current state. |
403 | InvalidOpt | The specified operation is invalid. Please try again later. If the problem still exists, submit a ticket. | The error message returned because the operation is unknown. Try again later. If the error persists, submit a ticket. |
403 | ConflictOpt | A conflicting operation is running. | The error message returned because an operation that conflicts with the current operation is in progress. Try again later. |
403 | ImageNotSupported | The specified image is not supported. | The error message returned because the selected image is not supported. Change the image and try again. |
404 | ImageNotFound | The specified image does not exist. | The error message returned because the specified image does not exist. |
404 | ClusterNotFound | The specified cluster does not exist. | The error message returned because the specified cluster does not exist. |
404 | VolumeNotFound | The specified volume does not exist. | The error message returned because the specified NAS file system does not exist. |
404 | ManagerNotFound | The manager nodes do not exist or their status is abnormal. | The error message returned because the management node does not exist or is not running as expected. |
404 | ObjectNotFound | The specified object is not found. | The error message returned because the specified object does not exist. |
406 | EcsError | An error occurred while calling the ECS API operation. | The error message returned because the ECS API call has failed. |
406 | EipError | The EIP API request failed. | The error message returned because the operation has failed to call the EIP service. |
406 | DbError | A database service error occurred. | The error message returned because the database request has failed. |
406 | AliyunError | An Alibaba Cloud product error occurred. | The error message returned because the operation has failed to call another Alibaba Cloud service. |
407 | NotAuthorized | You are not authorized by RAM for this request. | The error message returned because you are not authorized by RAM for this request. |
409 | PartFailure | Part of the batch operation failed. | The error message returned because the batch operation has failed. |
500 | UnknownError | An unknown error occurred. | The error message returned because an unknown error has occurred. Try again later. If the error persists, submit a ticket. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The error message returned because the request has failed. The service is temporarily unavailable. |
For a list of error codes, visit the API Error Center.