All Products
Search
Document Center

Elastic High Performance Computing:ApplyNodes

Last Updated:Oct 26, 2026

Invokes ApplyNodes to add one or more compute nodes that use the pay-as-you-go billing method or spot compute nodes to a specified cluster.

Operation description

Operation description

This operation allows you to flexibly request resources based on the number of nodes, vCPU count, memory size, and other dimensions.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 cluster to which you want to add nodes.

You can call the ListClusters operation to query the cluster ID.

ehpc-hz-FYUr32****

ImageId

string

No

The ID of the image for the nodes to be added. This parameter takes effect only when TargetImageId is not specified.

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

Note

If you add multiple nodes, only the nodes for which TargetImageId is specified use the TargetImageId value.

centos_7_06_64_20G_alibase_20190711.vhd

ComputeSpotStrategy

string

No

The preemption policy for compute nodes. Valid values:

  • NoSpot: nodes that use the pay-as-you-go billing method.

  • SpotWithPriceLimit: spot instances with Settings for the maximum price limit.

  • SpotAsPriceGo: spot instances for which the system automatically bids based on the current actual marketplace price.

Default value: NoSpot.

NoSpot

ComputeSpotPriceLimit

number

No

The maximum hourly price for compute nodes. The value is a floating-point number and supports up to three decimal places. This parameter takes effect when ComputeSpotStrategy is set to SpotWithPriceLimit.

If both ComputeSpotPriceLimit and InstanceTypeModel.N.MaxPrice are specified, compute nodes are created based on the smaller value of the two parameters.

0.68

SystemDiskType

string

No

The category of the system cloud disk. Valid values:

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

  • cloud: basic disk (discontinued)

cloud_ssd

SystemDiskSize

integer

No

The size of the system cloud disk. Unit: GB.

Valid values: 40 to 500.

Default value: 40.

40

HostNamePrefix

string

No

The hostname prefix. This helps you classify and manage nodes.

compute

HostNameSuffix

string

No

The hostname suffix. This helps you classify and manage nodes.

01

AllocatePublicAddress

boolean

No

Specifies whether to assign a public IP address. Valid values:

  • true: Assigns a public IP address.

  • false: Does not assign a public IP address.

Default value: false.

false

InternetChargeType

string

No

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

  • PayByBandwidth: pay-by-bandwidth

  • PayByTraffic: pay-by-data-transfer

PayByTraffic

InternetMaxBandWidthIn

integer

No

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: 1 to 10. Default value: 10.

  • If the purchased outbound public bandwidth is greater than 10 Mbit/s: 1 to the value of InternetMaxBandWidthOut. Default value: the value of InternetMaxBandWidthOut.

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. This parameter is required when ResourceAmountType is set to Cores.

You can specify both vCPU and Memory to define node specifications. For example, vCPU=2 and Memory=16 define all node specifications that have 2 vCPUs and 16 GB of memory. The system determines the available node specifications based on factors such as node specifications and zones, and creates nodes with the lowest price based on price sorting.

2

Memory

integer

No

The memory size. This parameter is required when ResourceAmountType is set to Cores. Unit: GB.

You can specify both vCPU and Memory to define node specifications. For example, vCPU=2 and Memory=16 define all node specifications that have 2 vCPUs and 16 GB of memory. The system determines the available node specifications based on factors such as node specifications and zones, and creates nodes with the lowest price based on price sorting.

16

InstanceFamilyLevel

string

No

The level of the instance family. This parameter takes effect only when Cores and Memory are specified. Valid values:

  • EntryLevel: entry-level.

  • EnterpriseLevel: enterprise-level.

  • CreditEntryLevel: credit-based entry-level. For more information, see Burstable instances.

Default value: EnterpriseLevel.

EntryLevel

TargetCapacity

integer

Yes

The expected resource count to add. The specific resource count depends on the value of ResourceAmountType.

  • If ResourceAmountType is set to Instances, valid values of TargetCapacity: 1 to 200.

  • If ResourceAmountType is set to Cores, valid values of TargetCapacity: 1 to 1000.

20

ResourceAmountType

string

No

The type of resources to add. Valid values:

  • Instances: ECS instances that correspond to compute nodes.

  • Cores: vCPUs and memory.

Default value: Instances.

Instances

PriorityStrategy

string

No

The application policy for spot nodes. Valid values:

  • LowPriceResourcePlanning: attempts to create nodes in ascending order of vCPU unit price. When multiple node specifications that use the spot billing method are configured, the system preferentially creates the corresponding nodes that use spot billing.

  • CapacityOptResourcePlanning: comprehensively orchestrates and creates nodes based on lower prices and lower release rates.

  • CustomizedResourcePlanning: scales out based on predefined zones (ZoneIds.N). If a higher-priority zone has no instance inventory, the system automatically uses the zone with the next priority.

LowPriceResourcePlanning

StrictSatisfiedTargetCapacity

boolean

No

Specifies whether to strictly meet the quantity requirement of TargetCapacity. Valid values:

  • true: If the inventory is insufficient, no nodes are created and an error is returned. If the inventory is sufficient, the following two situations may occur:

    • If StrictResourceProvision is set to true: The system checks the inventory and creates nodes only when the inventory is sufficient. The system strictly creates the expected number of nodes. Otherwise, no nodes are created.

    • If StrictResourceProvision is set to false: The system checks the inventory and creates nodes only when the inventory is sufficient. However, the system may create only some nodes because the real-time inventory is insufficient when nodes are created after the inventory is queried.

  • false: If the inventory is insufficient, the system creates some nodes based on the available inventory.

Default value: true.

true

SystemDiskLevel

string

No

When creating an ESSD standard SSD as the system cloud disk, the Settings for the performance level of the cloud disk. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.

  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.

  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.

  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

Default value: PL0. For more information about how to select the performance level of an ESSD, see ESSDs.

PL0

StrictResourceProvision

boolean

No

Specifies whether the quantity requirement of TargetCapacity must be strictly met. This parameter takes effect when StrictSatisfiedTargetCapacity is set to true. Valid values:

  • true: The system checks the inventory and creates nodes only when the inventory is sufficient. The system strictly creates the expected number of nodes. Otherwise, no nodes are created.

  • false: The system checks the inventory and creates nodes only when the inventory is sufficient. However, the system may create only some nodes because the real-time inventory is insufficient when nodes are created after the inventory is queried.

Default value: false.

false

Round

integer

No

The total number of batches for creating nodes in batches. Valid values: 1 to 10.

Default value: 1.

1

Interval

integer

No

The time interval between batches for creating nodes in batches. Unit: seconds. Valid values: 60 to 600.

Default value: 60.

60

ZoneInfos

array<object>

Yes

The zone information. You can add up to 10 zones.

object

No

The array of zone information.

VSwitchId

string

No

The ID of the vSwitch for the nodes to be added. Valid values of N: 1 to 10.

vsw-bp1e47optm9g58zcu****

ZoneId

string

No

The ID of the zone for the nodes to be added. Valid values of N: 1 to 10.

Note

Multiple zone IDs must be unique.

cn-hangzhou-b

InstanceTypeModel

array<object>

No

The spot instance information.

object

No

The array of spot instance information.

MaxPrice

number

No

The maximum hourly price that you are willing to pay for the spot instance. The value is a floating-point number and supports up to three decimal places.

This parameter takes effect only when ComputeSpotStrategy is set to SpotWithPriceLimit.

Valid values of N: 1 to 10.

0.034

TargetImageId

string

No

The ID of the image for the nodes to be added. The image must be a Windows image.

Valid values of N: 1 to 10.

win2016_1607_x64_dtc_zh-cn_40G_alibase_20210516.vhd

InstanceType

string

No

The node specifications to be added. By default, the compute node specifications used during the last scale-out or cluster creation are used.

Valid values of N: 1 to 10.

ecs.n1.tiny

Tag

array<object>

No

The tag information.

object

No

The array of tag information.

Key

string

No

The tag key of the nodes to be added. The tag key cannot be an empty string. It can be up to 128 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://.

Valid values of N: 1 to 20.

TestKey

Value

string

No

The tag value of the nodes to be added. The tag value can be an empty string. It can be up to 128 characters in length and cannot start with acs:. It cannot contain http:// or https://.

Valid values of N: 1 to 20.

TestValue

JobQueue

string

No

The name of the queue to which the compute nodes are added.

You can call the ListQueues operation to query existing queue names.

workq

UserData

string

No

The instance user data. The data must be encoded in Base64. The maximum size of the raw data is 16 KB. Linux operating systems support shell scripts. Windows operating systems support bat and powershell formats. Before Base64 encoding, the first line must be [bat] or [powershell].

Note

Because the UserData Settings are not encrypted when API requests are transmitted, do not pass confidential information such as passwords and private keys in plaintext. If you must pass such information, encrypt the information, encode it in Base64, and then pass it. You can perform decryption in the same way within 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 that are successfully created.

10

TaskId

string

The request ID.

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

Detail

string

The details of the API call result.

Resources Application is satisfied. Creating...

InstanceIds

object

InstanceId

array

The instance ID.

Note

Because ApplyNodes is an asynchronous operation, the result is returned immediately after the request succeeds without waiting for the instances to be created. Therefore, InstanceIds is empty. You can call the ListNodes operation to query the instance ID.

string

The instance ID.

Note

Because ApplyNodes is an asynchronous operation, the result is returned immediately after the request succeeds without waiting for the instances to be created. Therefore, InstanceIds is empty. You can call the ListNodes operation to query the instance ID.

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. The recommendation set is empty. No suitable alternative instance types are available in the specified region or zone.
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.