edit-icon download-icon

API for nodes

Last Updated: Aug 02, 2018

Add multiple nodes

Use this API to add multiple nodes.

Request parameter

Field Type Required Default value Description
Action String Yes - Operation interface name. Value: AddNodes.
RegionId String Yes - Region ID.
ClusterId String Yes - Cluster ID.
Count Integer Yes - Number of computing nodes to be added.

Return parameter

Public return parameters and the following parameters:

Field Type Description
InstanceIds Array Array of the node ID.

Error code

Code Description
InvalidParams Invalid parameters.
InvalidStatus The current cluster status does not allow further operations.
TooManyNodes The cluster node threshold is exceeded.
EcsError ECS API call failed.
UnknownError An unknown error has occured.

DeleteNodes

Use this API to delete nodes.

Request parameter

Field Type Required Default value Description
Action String Yes - Operation interface name. Value: DeleteNodes.
RegionId String Yes - Region ID.
ClusterId String Yes - Cluster ID.
Instance.n.Id String Yes - ID of the nth node instance to be deleted (n starts from 1. Multiple entries are supported.)
ReleaseInstance Boolean No true Whether to release instances created by E-HPC.

Return parameter

Public return parameters.

Error code

Code Description
InvalidParams Invalid parameters.
InvalidStatus Operation not allowed in the current cluster or node status.
EcsError ECS API call failed.
UnknownError An unknown error has occured.

ResetNodes

Use this API to reset nodes.

Request parameter

Field Type Required Default value Description
Action String Yes - Operation interface name. Value: ResetNodes.
RegionId String Yes - Region ID.
ClusterId String Yes - Cluster ID.
Instance.n.Id String Yes - ID of the nth node instance to be reset (n starts from 1. Multiple entries are supported.)

Return parameter

Public return parameters.

Error code

Code Description
InvalidParams Invalid parameters.
InvalidStatus Operation not allowed in the current cluster or node status.
EcsError ECS API call failed.
UnknownError An unknown error has occured.

ListNode

Use this API to query the node information of a specified cluster.

Request parameter

Field Type Required Default value Description
Action String Yes - Operation interface name. Value: ListNodes.
RegionId String Yes - Region ID.
ClusterId String Yes - Cluster ID.
Role String No Compute Node role, which can be Manager (control node), Logon (stepping stone instance), or Compute (computing node).
PageNumber Integer No 1 Displayed page number; initial value: 1.
PageSize Integer No 10 Number of entries per page; value range: 1 to 50.

Return parameter

Public return parameters and the following parameters:

Field Type Description
Nodes Array Array of the node information.
TotalCount Integer Total number of entries in the list.
PageNumber Integer Current page number.
PageSize Integer Number of entries on the current page.

The NodeInfo structure includes the following fields:

Field Value Description
Id String Node instance ID.
RegionId String Region ID.
Status String Node status.
CreateByEhpc Boolean Whether the node is created by E-HPC. Currently, all nodes are created by E-HPC.
Role String Node type, which can be a ‘Scheduler’ (master scheduler), ‘SchedulerBackup’ (backup scheduler), ‘Account’ (master domain server), ‘AccountBackup’ (backup domain server), ‘Logon’ (stepping stone instance), or ‘Compute’ (computing node). Schedulers and domain servers are control nodes (Manager).
TotalResources ResourceType Total number of resources.
UsedResources ResourceType Resource usage of computing nodes. For other node types, the returned value is null.
AddTime Date The time when the node is added to the cluster.

For computing nodes, the ResourceType structure includes the following fields:

Field Value Description
Cpu Integer Total CPU resources; unit: core.
Memory Integer Total memory resources; unit: GB.
Gpu Integer Total GPU resources; unit: card.

Optional values of the Status (node status):

Value Description
uninit The node is not initialized.
init The node is being initialized.
ready The node is idle.
running The node is running.
exception The node is abnormal.

Error code

Code Description
InvalidParams Invalid parameters.
EcsError ECS API call failed.
UnknownError Unknown error.
Thank you! We've received your feedback.