All Products
Search
Document Center

Elastic High Performance Computing:ApplyNodes

Last Updated:Apr 12, 2024

Adds pay-as-you-go or preemptible compute nodes to a cluster.

Operation description

Description

You can call the ApplyNodes operation to specify the number of compute nodes, the number of vCPUs, and the memory size when you add 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.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The ID of the E-HPC cluster.

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

ehpc-hz-FYUr32****
ImageIdstringNo

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

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

Note If you add multiple compute nodes, the TargetImageId parameter takes effect only on the nodes for which the TargetImageId parameter is specified.
centos_7_06_64_20G_alibase_20190711.vhd
ComputeSpotStrategystringNo

The preemption policy of the compute nodes. 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.

NoSpot
ComputeSpotPriceLimitfloatNo

The maximum hourly price of the compute nodes. The value is a floating-point number that supports up to three decimal places. The parameter takes effect only when ComputeSpotStrategy is set to SpotWithPriceLimit.

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

0.68
SystemDiskTypestringNo

The type of the system disk. Valid values:

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

The size of the system disk. Unit: GB.

Valid values: 40 to 500.

Default value: 40.

40
HostNamePrefixstringNo

The prefix of the hostname. You can specify the parameter to manage the compute nodes in an efficient manner.

compute
HostNameSuffixstringNo

The suffix of the hostname. You can specify the parameter to manage the compute nodes in an efficient manner.

01
AllocatePublicAddressbooleanNo

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.

false
InternetChargeTypestringNo

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

  • PayByBandwidth: pay-by-bandwidth
  • PayByTraffic: pay-by-traffic
PayByTraffic
InternetMaxBandWidthInintegerNo

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 10 Mbit/s, the valid values of this parameter are 1 to the amount of the outbound bandwidth that is purchased. The default value is the value of the InternetMaxBandWidthOut parameter.
10
InternetMaxBandWidthOutintegerNo

The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100.

Default value: 0.

10
CoresintegerNo

The number of vCPUs. The parameter is required when the ResourceAmountType parameter is set to Cores.

You can set vCPU and Memory to query node specifications. For example, you can query the available compute nodes that have 2 vCPUs and 16 GB of memory by setting vCPU to 2 and Memory to 16. You can also query compute nodes by node specification and zone. Query results are sorted by price. The nodes that have the lowest price are created.

2
MemoryintegerNo

The memory capacity. The parameter is required when the ResourceAmountType parameter is set to Cores. Unit: GB.

You can set vCPU and Memory to query node specifications. For example, you can query the available compute nodes that have 2 vCPUs and 16 GB of memory by setting vCPU to 2 and Memory to 16. You can also query compute nodes by node specification and zone. Query results are sorted by price. The nodes that have the lowest price are created.

16
InstanceFamilyLevelstringNo

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

Default value: EnterpriseLevel.

EntryLevel
TargetCapacityintegerYes

The amount of the resource that you want to add. The specific number depends on the value of the ResourceAmountType parameter:

  • If ResourceAmountType is set to Instance, the value range of TargetCapacity is 1 to 200.
  • If ResourceAmountType is set to Cores, the value range of TargetCapacity is 1 to 1,000.
20
ResourceAmountTypestringNo

The type of the resource that you want to add. Valid values:

  • Instances: the ECS instances that are used as compute nodes
  • Cores: vCPU and memory

Default value: Instances.

Instances
PriorityStrategystringNo

The application policy of the preemptible nodes. Valid values:

  • LowPriceResourcePlanning: Preemptible nodes are created based on the unit prices of vCPUs in ascending order. Preemptible nodes are created first when multiple preemptible instance types are specified.
  • CapacityOptResourcePlanning: Preemptible nodes are created based on the prices and release rates in ascending order.
  • CustomizedResourcePlanning: Nodes are added based on the predefined value of the ZoneIds.N parameter. Instances of a zone that has a higher priority are used first.
LowPriceResourcePlanning
StrictSatisfiedTargetCapacitybooleanNo

Specifies whether to meet the requirements of the TargetCapacity parameter. Valid values:

  • true: If the available resources are fewer than the resources that you want to add, no compute nodes are created and an error is returned. If the available resources are more than the resources that you want to add, the following cases may occur:

    • If StrictResourceProvision is set to true, check the inventory of the resources. Compute nodes are created based on the value of the TargetCapacity parameter only when the available resources are sufficient. Otherwise, no compute nodes are created.
    • If StrictResourceProvision is set to false, check the inventory of the resources. Compute nodes are created only when the available resources are sufficient. However, some compute nodes may fail to be created because resources become insufficient after the inventory query.
  • false: If the available resources are insufficient, compute nodes are created based on the inventory of the resources.

Default value: true.

true
SystemDiskLevelstringNo

The performance level of the ESSD that you want to use as the system 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 IOPS of random read/write.
  • 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, see ESSDs .

PL0
StrictResourceProvisionbooleanNo

Specifies whether to strictly meet the requirements of the TargetCapacity parameter. The parameter takes effect only when StrictSatisfiedTargetCapacity is set to true. Valid values:

  • true: Check the inventory of the resources. Compute nodes are created based on the value of the TargetCapacity parameter only when the available resources are sufficient. Otherwise, no compute nodes are created.
  • false: Check the inventory of the resources. Compute nodes are created only when the available resources are sufficient. However, some compute nodes may fail to be created because resources become insufficient after the inventory query.

Default value: false.

false
RoundintegerNo

The total number of batches to create nodes. Valid values: 1 to 10.

Default value: 1.

1
IntervalintegerNo

The interval between two consecutive batches. Valid values: 60 to 600. Unit: seconds.

Default value: 60.

60
ZoneInfosobject []Yes

The details of the zones. You can specify up to 10 zones.

VSwitchIdstringYes

The ID of the vSwitch. Valid values of N: 1 to 10.

vsw-bp1e47optm9g58zcu****
ZoneIdstringYes

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
InstanceTypeModelobject []No

The information about the preemptible instance.

MaxPricefloatNo

The maximum hourly price that you can pay for the preemptible node. The value is a floating-point number that supports up to three decimal places.

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

Valid values of N: 1 to 10.

0.034
TargetImageIdstringNo

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
InstanceTypestringNo

The instance type of the compute node. The default value is the instance type that was specified when you created the cluster or the last time you added compute nodes.

Valid values of N: 1 to 10.

ecs.n1.tiny
Tagobject []No

The details about the tags that are added to the nodes.

KeystringNo

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

Valid values of N: 1 to 20.

TestKey
ValuestringNo

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

Valid values of N: 1 to 20.

TestValue
JobQueuestringNo

The queue to which the compute nodes are added.

You can call the ListQueues operation to query the queue name.

workq
UserDatastringNo

The user data of the instance. The user data must be Base64-encoded. The raw data can be up to 16 KB in size. Linux operating systems support shell scripts. Windows operating systems support bat and Powershell scripts. Before you perform Base64 encoding, make sure that the content to be encoded includes [bat] or [powershell] as the first row.

Note We recommend that you do not pass in confidential information, such as passwords or private keys, in plaintext as user data. This is because the system does not encrypt UserData values when API requests are transmitted. If you must pass in confidential information, we recommend that you encrypt and encode the information in Base64, and then decode and decrypt the information in the same way inside the instance.
ZWNobyBoZWxsbyBlY3Mh

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The task ID.

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

The number of the compute nodes that are created.

10
TaskIdstring

The request ID.

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

The detailed result of the request.

Resources Application is satisfied. Creating...
InstanceIdsarray

The instance IDs.

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 this parameter is null. You can call the ListNodes operation to query the IDs of the ECS instances.
string

The instance IDs.

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 query the ID of the ECS instance.
null

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParamsThe specified parameter %s is invalid.The specified parameter %s is invalid.
400NotEnabledYou have not enabled this serviceYou have not enabled this service
400InDebtYour account has overdue payments.Your account has overdue payments.
400InvalidVswitchThe 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.
400InvalidImageThe image ID is invalid.The image ID is invalid.
400InvaildSystemDiskSizeThe 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.
400InvalidInstanceType.NotSupportedThe instance type is invalid.The instance type is invalid.
400InvalidZoneId.ValueNotSupportedThe specified ZoneId is invalid.The specified zone ID is invalid.
403TooManyComputesThe number of computing nodes exceeds the quota.The number of computing nodes exceeds the quota.
403TooManyLoginsThe maximum number of logged on nodes is exceeded.The maximum number of logged on nodes is exceeded. The default maximum value is 2.
403TooManySccThe maximum number of SCC instances is exceeded.The maximum number of SCC instances is exceeded. The default maximum value is 15.
403InvalidClusterStatusThe operation failed due to invalid cluster status.The cluster status does not support the operation.
403ConflictOptA conflicting operation is running.A conflicting operation is running. Please try again later.
403ImageNotSupportedThe specified image is not supported.The specified image does not exist. Change the image and try again.
403InvalidCapacityNum.ValueNotSupportedThe specified TargetCapacity is invalid.The specified target capacity is invalid.
403RecommendEmpty.InstanceTypeSoldOutThe resource is out of stock.The resource is out of stock.
403ResourceTargetAmount.NotSatisfiedThe resource application is not satisfied.The resource application is not satisfied.
403RecommendEmpty.PriceNotSatisfiedThe price limit is not satisfied.The price limit is not satisfied.
403QuotaExceed.PayasyougoInstanceThe pay-as-you-go instance exceeds the quota.The pay-as-you-go instance exceeds the quota.
403RecommendEmpty.InstanceTypeNoStockThe instanceTypes are out of usage.The instance type is unavailable.
403RecommendEmpty.InstanceTypeNotAuthorizedThe recommend instanceTypes are not authorized.-
403InvalidOptThe specified operation is invalid. Please try again later.The operation is unknown. Please check arguments and try again later.
404ImageNotFoundThe specified image does not exist.The specified image does not exist. Please verify the parameter.
404ClusterNotFoundThe specified cluster does not exist.The specified instance does not exist.
404VolumeNotFoundThe specified volume does not exist.The specified storage does not exist. Please verify the parameter.
404ManagerNotFoundThe manager nodes do not exist or their status is abnormal.The manager nodes do not exist or their status is abnormal.
404ObjectNotFoundThe specified object is not found.The specified object does not exist. Please verify the parameter.
404VswitchNotFoundThe specified vSwitch does not exist.The specified vSwitch does not exist.
406EcsErrorAn error occurred while calling the ECS API operation.An error occurred while calling the ECS API operation.
406EipErrorThe EIP API request failed.EIP API request failed.
406DbErrorA database service error occurred.Database request failed.
406AliyunErrorAn Alibaba Cloud product error occurred.An Alibaba Cloud product error occurred.
407NotAuthorizedYou are not authorized by RAM for this request.The request is not authorized by RAM.
409PartFailurePart of the batch operation failed.Part of the batch operation failed.
500UnknownErrorAn unknown error occurred.An unknown error occurred.
503ServiceUnavailableThe request has failed due to a temporary failure of the serverThe 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 timeSummary of changesOperation
2024-03-05The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 407
    delete Error Codes: 409
    delete Error Codes: 500
    delete Error Codes: 503
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: UserData
2022-10-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 407
    delete Error Codes: 409
    delete Error Codes: 500
    delete Error Codes: 503