Adds one or more compute nodes to a cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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.

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.

  • If the number of available Elastic Compute Service (ECS) instances is less than the value of the MinCount parameter, the compute nodes cannot be added.
  • If the number of available ECS instances is greater than the value of the MinCount parameter and less than that of the Count parameter, the compute nodes are added based on the value of the MinCount parameter.
  • If the number of available ECS instances is greater than the value of the Count parameter, the compute nodes are added based on the value of the Count parameter.
ImageOwnerAlias String No system

The type of the image. Valid values:

  • system: public image
  • self: custom image
  • others: shared image
  • marketplace: Alibaba Cloud Marketplace image

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:

  • The operating system that is specified by the image must be the same as that of the existing cluster nodes. For example, if the operating system of the cluster nodes is CentOS, you can select only a CentOS image.
    Note If you add nodes to a hybrid cloud cluster that supports multiple operating systems, you can select a Windows Server image or a CentOS image when the operating system of the cluster nodes is Windows.
  • The major version of the image specified for the compute nodes that you want to add is the same as that of the image of the cluster. For example, if the version of the cluster image is CentOS 7.x, the version of the image specified for the compute nodes must be CentOS 7.x.

You can call the ListImages and ListCustomImages operations to query the image ID.

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:

  • NoSpot: The compute nodes are pay-as-you-go instances.
  • SpotWithPriceLimit: The compute nodes are preemptible instances that have a user-defined maximum hourly price.
  • SpotAsPriceGo: The compute nodes are preemptible instances for which the market price at the time of purchase is used as the bid price.

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:

  • PostPaid: pay-as-you-go
  • PrePaid: subscription

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:

  • If PeriodUnit is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • If PeriodUnit is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.

Default value: 1

PeriodUnit String No Month

The unit of the subscription duration. Valid values:

  • Week
  • Month

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:

  • true: enables auto-renewal
  • false: disables auto-renewal

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.

  • If PeriodUnit is set to Week, the valid values of the AutoRenewPeriod parameter are 1, 2, and 3.
  • If PeriodUnit is set to Month, the valid values of the AutoRenewPeriod parameter are 1, 2, 3, 6, and 12.

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:

  • manual: The compute nodes are manually added.
  • autoscale: The compute nodes are automatically added.

Default value: manual

SystemDiskType String No cloud_ssd

The type of the system disk. Valid values:

  • cloud_efficiency: ultra disk.
  • cloud_ssd: SSD.
  • cloud_essd: ESSD.
  • cloud: basic disk. Disks of this type are retired.

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 to which the cluster belongs.

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:

  • true: Hyper-threading is supported.
  • false: Hyper-threading is not supported.

Default value: true

AllocatePublicAddress Boolean No false

Specifies whether to allocate a public IP address to the compute nodes. Valid values:

  • true: A public IP address is allocated to the compute nodes.
  • false: A public IP address is not allocated to the compute nodes.

Default value: false

InternetChargeType String No PayByTraffic

The billing method of the elastic IP address (EIP). Valid values:

  • PayByBandwidth: pay-by-bandwidth
  • PayByTraffic: pay-by-traffic
InternetMaxBandWidthIn Integer No 10

The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:

  • If the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of the parameter are 1 to 10 and the default value is 10.
  • If the purchased outbound public bandwidth is greater than 10Mbit/s, the valid values of this parameter are 1 to the amount of the outbound bandwidth that is purchased.
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 that is created as the system disk. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 input/output operations per second (IOPS) of random read/write.
  • PL1: A single ESSD can deliver up to 50,000 IOPS of random read/write.
  • PL2: A single ESSD can deliver up to 100,000 IOPS of random read/write.
  • PL3: A single ESSD can deliver up to 1,000,000 IOPS of random read/write.

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.

  • If the number of available ECS instances is less than the value of the MinCount parameter, the compute nodes cannot be added.
  • If the number of available ECS instances is greater than the value of the MinCount parameter and less than that of the Count parameter, the compute nodes are added based on the value of the MinCount parameter.
  • If the number of available ECS instances is greater than the value of the Count parameter, the compute nodes are added based on the value of the Count parameter.

Default value: 1

Response parameters

Parameter Type Example Description
InstanceIds List null

The IDs of the ECS instances.

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.
RequestId String B745C159-3155-4B94-95D0-4B73D4D2****

The ID of the request.

TaskId String B745C159-3155-4B94-95D0-4B73D4D2****

The ID of the task.

Examples

Sample requests

http(s)://ehpc.cn-hangzhou.aliyuncs.com/?Action=AddNodes
&ClusterId=ehpc-hz-FYUr32****
&Count=10
&<Common request parameters>

Sample success responses

XML format

<AddNodesResponse>
  <TaskId>B745C159-3155-4B94-95D0-4B73D4D2****</TaskId>
  <RequestId>B745C159-3155-4B94-95D0-4B73D4D2****</RequestId>
  <InstanceIds>
        <InstanceId>null</InstanceId>
  </InstanceIds>
</AddNodesResponse>

JSON format

{
    "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 has not been activated for your account.
400 InDebt Your account has overdue payments. The error message returned because your account has overdue payments.
403 TooManyComputes The number of computing nodes exceeds the quota. The error message returned because the number of compute nodes have 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 have exceeded the logon node quota, which is two. For more logon nodes, submit a ticket.
403 TooManyScc The maximum number of SCC instances is exceeded. The error message returned because the number of Super Computing Cluster (SCC) instances have exceeded the SCC instance quota, which is 15. For more SCC instances, 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 cluster 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 storage instance 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.
407 NotAuthorized You are not authorized by RAM for this request. The error message returned because you are not authorized by RAM for the request.
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 Elastic IP Address 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.
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.
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.
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.