すべてのプロダクト
Search
ドキュメントセンター

:API for nodes

最終更新日:Mar 17, 2020

AddNodes

Add one or more compute nodes.

Description

You can call this operation to add 1 to 99 compute nodes.

Request parameters

Field Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to AddNodes.
RegionId String Yes N/A The ID of the region.
ClusterId String Yes N/A The ID of the cluster.
Count Integer Yes N/A The number of compute nodes. Valid values: 1 to 99.
ComputeSpotStrategy String No N/A The spot strategy. Valid values: NoSpot, SpotWithPriceLimit, and SpotAsPriceGo.
ComputeSpotPriceLimit String No N/A The highest hourly price of the instance. The value is a floating-point number and the value range is the current price range.
ImageOwnerAlias String No system The image type. Valid values: system, self, others, and marketplace.
ImageId String No N/A The image ID. If the value of the ImageType parameter is system, the image ID depends on the OsTag parameter. If the value of the ImageType parameter is self, others, or marketplace, the ImageId parameter must be specified.
InstanceType String No N/A The instance type. If this parameter is not specified, the instance type that is last used when compute nodes are added or when the cluster is created takes effect.
EcsChargeType String No PostPaid The billing method of the ECS instance that is used by the cluster. Valid values: PostPaid and PrePaid. If you select the subscription billing method, auto-renewal is enabled by default. After compute nodes are released, auto-renewal is disabled.
Period Integer No N/A The billing cycle for the instance. Unit: week or month. This parameter only takes effect and is required when the value of the EcsChargeType parameter is PrePaid.
PeriodUnit String No N/A The unit of the billing cycle for the instance. Valid values: Week and Month.
AutoRenew Boolean No false Specifies whether auto-renewal is enabled. Valid values: true and false.
AutoRenewPeriod Integer No 1 The auto-renewal period of the instance. This parameter takes effect when the value of the AutoRenew parameter is true.
CreateMode String No manual Specifies the method to create compute nodes. Valid values: manual and autoscale.

Response parameters

This operation returns only common parameters. For more information, see common parameters.

Note : AddNodes is an asynchronous operation. The response is immediately returned after the request is successful regardless of whether the instance is created. Therefore, the InstanceId parameter is not returned. You can obtain the instance ID by calling the ListNodes operation.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.

DeleteNodes

Delete one or more compute nodes.

Description

You can call this operation to delete one or more compute nodes. Before you remove compute nodes from a cluster, you must make sure that all job data on these nodes is exported.

Request parameters

Field Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to DeleteNodes.
RegionId String Yes N/A The ID of the region.
ClusterId String Yes N/A The ID of the cluster.
Instance.n.Id String Yes N/A The ID of the nth node instance. n starts from 1. You can specify one or more IDs.
ReleaseInstance Boolean No true Specifies whether to release instances that are created in E-HPC.

Response parameters

This operation returns only common parameters. For more information, see Common parameters.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.

ListNodes

Query nodes.

Description

You can call this operation to query information about all nodes in a cluster.

Request parameters

Field Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to ListNodes.
RegionId String Yes N/A The ID of the region.
ClusterId String Yes N/A The ID of the cluster.
Role String No N/A The role of the node. Valid values: Manager, Login, and Compute, indicating a cluster management node, a logon node, and a compute node, respectively.
HostName String No N/A The name of the node. You can perform a fuzzy search. MySQL regular expressions are supported.
OnlyDetached Boolean No false Specifies whether to query only information about nodes that are not managed by E-HPC. If the value of this parameter is true, only nodes that are not released by E-HPC (such as subscription nodes or nodes that are not created by E-HPC) are returned.
PageNumber Integer No 1 The number of the page to return. Pages start from page 1.
PageSize Integer No 10 The number of entries to return on each page. Valid values: 1 to 50.

Response parameters

The response parameters include both common parameters and the parameters described in the following table.

Field Type Description
Nodes Array<NodeInfo> An array of nodes.
TotalCount Integer The total number of entries.
PageNumber Integer The page number of the returned page.
PageSize Integer The number of entries returned per page.

The following table describes the parameters that are contained in the NodeInfo element.

Field Type Description
Id String The ID of the node instance.
RegionId String The ID of the region.
Status String The status of the node.
CreateByEhpc Boolean Indicates whether the node is created by E-HPC. At present, all nodes are created by E-HPC.
Role String The type of the node. Valid values: Scheduler: the primary scheduler. SchedulerBackup: the secondary scheduler. Account: the primary domain server. AccountBackup: the secondary domain server. Login: the jump server. Compute: the compute node. Both the schedulers and domain servers are cluster management nodes (Manager).
Roles Array No
TotalResources ResourceType The statistics of all resources in the cluster.
UsedResources ResourceType The statistics of compute nodes in the cluster. No values are returned for other types of nodes.
AddTime Date The time when the node was added to the cluster.
SpotStrategy String The spot strategy for pay-as-you-go instances.
LockReason String The reason why the node was locked. The default value is an empty string.
ExpiredTime Date The expiration time of the subscription node. If the node is a pay-as-you-go node, no value is returned for this parameter.
Expired Boolean Indicates whether the subscription node expires. If the node is a pay-as-you-go node, the value of this parameter is false.
ImageOwnerAlias String The image type. Valid values: system, self, others, and marketplace.
ImageId String The ID of the image.
Location String The location where the node is deployed. Valid values: OnPremise and PublicCloud. The OnPremise value indicates that the node is deployed on a hybrid cloud. The PublicCloud value indicates that the node is deployed on the Alibaba Cloud public cloud.
CreateMode String Indicates how the node was created. Valid values: manual and autoscale.

The following table describes the parameters that are contained in the ResourceType element.

Field Type Description
Cpu Integer The number of CPU cores.
Memory Integer The memory capacity. Unit: GB.
Gpu Integer The number of GPU cards.

The following table describes valid values of the Status parameter.

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 encounters an error.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.

ListNodesByQueue

Query node information by queue.

Description

You can call this operation to query information about nodes in a cluster by queue.

Request parameters

Field Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to ListNodesByQueue.
ClusterId String Yes N/A The ID of the cluster.
RegionId String Yes N/A The ID of the region.
QueueName String Yes N/A The name of the queue.
PageNumber int No 1 The number of the page to return. Pages start from page 1.
PageSize int No 10 The number of entries to return on each page. Valid values: 1 to 50.

Response parameters

The response parameters include both common parameters and the parameters described in the following table.

Field Type Description
Nodes Array<NodeInfo> An array of nodes.
TotalCount Integer The total number of entries.
PageNumber Integer The page number of the returned page.
PageSize Integer The number of entries returned per page.

The following table describes the parameters that are contained in the NodeInfo element.

Field Type Description
AddTime Date The time when the node was added to the cluster.
CreateMode String Indicates how the node was created. Valid values: manual and autoscale.
HostName String The hostname of the node.
Id String The ID of the node instance.
ImageId String The ID of the image.
ImageOwnerAlias String The image type. Valid values: system, self, others, and marketplace.
InstanceInfo String The detailed information about the node instance.
IpInfo String The information about IP addresses, including the private IP address and public IP address.
Location String The location where the node is deployed. Valid values: OnPremise and PublicCloud. The OnPremise value indicates that the node is deployed on a hybrid cloud. The PublicCloud value indicates that the node is deployed on the Alibaba Cloud public cloud.
LockReason String The reason why the node was locked. The default value is an empty string.
SpotStrategy String The spot strategy for pay-as-you-go instances.
Status String The status of the node.
TotalResources ResourceType The statistics of all resources in the cluster.
UsedResources ResourceType The statistics of compute nodes in the cluster. No values are returned for other types of nodes.
VSwitchId String The ID of the VSwitch.
VpcId String The ID of the VPC.
ZoneId String The ID of the zone where the node instance resides.

The following table describes the parameters that are contained in the ResourceType element.

Field Type Description
Cpu Integer The number of CPU cores.
Memory Integer The memory capacity. Unit: GB.
Gpu Integer The number of GPU cards.

The following table describes valid values of the Status parameter.

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 encounters an error.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.

ListNodesNoPaging

Query nodes in a cluster without pagination.

Description

You can call this operation to query information about all nodes in a cluster without pagination.

Request parameters

Field Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to ListNodesNoPaging.
RegionId String Yes N/A The ID of the region.
ClusterId String Yes N/A The ID of the cluster.
Role String No N/A The role of the node. Valid values: Manager, Login, and Compute, indicating a cluster management node, a logon node, and a compute node, respectively.
HostName String No N/A The name of the node. You can perform a fuzzy search. MySQL regular expressions are supported.
OnlyDetached Boolean No false Specifies whether to query only information about nodes that are not managed by E-HPC. If the value of this parameter is true, only nodes that are not released by E-HPC (such as subscription nodes or nodes that are not created by E-HPC) are returned.

Response parameters

The response parameters include both common parameters and the parameter described in the following table.

Field Type Description
Nodes Array<NodeInfo> An array of nodes.

The following table describes the parameters that are contained in the NodeInfo element.

Field Type Description
Id String The ID of the node instance.
RegionId String The ID of the region.
Status String The status of the node.
CreateByEhpc Boolean Indicates whether the node is created by E-HPC. At present, all nodes are created by E-HPC.
Role String The type of the node. Valid values: Scheduler: the primary scheduler. SchedulerBackup: the secondary scheduler. Account: the primary domain server. AccountBackup: the secondary domain server. Login: the jump server. Compute: the compute node. Both the schedulers and domain servers are cluster management nodes (Manager).
Roles Array An array of node roles.
TotalResources ResourceType The statistics of all resources in the cluster.
UsedResources ResourceType The statistics of compute nodes in the cluster. No values are returned for other types of nodes.
AddTime Date The time when the node was added to the cluster.
SpotStrategy String The spot strategy for pay-as-you-go instances.
LockReason String The reason why the node was locked. The default value is an empty string.
ExpiredTime Date The expiration time of the subscription node. If the node is a pay-as-you-go node, no value is returned for this parameter.
Expired Boolean Indicates whether the subscription node expires. If the node is a pay-as-you-go node, the value of this parameter is false.
ImageOwnerAlias String The image type. Valid values: system, self, others, and marketplace.
ImageId String The ID of the image.
Location String The location where the node is deployed. Valid values: OnPremise and PublicCloud. The OnPremise value indicates that the node is deployed on a hybrid cloud. The PublicCloud value indicates that the node is deployed on the Alibaba Cloud public cloud.

The following table describes the parameters that are contained in the ResourceType element.

Field Type Description
Cpu Integer The number of CPU cores.
Memory Integer The memory capacity. Unit: GB.
Gpu Integer The number of GPU cards.

The following table describes valid values of the Status parameter.

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 encounters an error.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.

ResetNodes

Reset one or more compute nodes.

Description

You can call this operation to reset one or more compute nodes in a cluster.

Request parameters

Field Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to ResetNodes.
RegionId String Yes N/A The ID of the region.
ClusterId String Yes N/A The ID of the cluster.
Instance.n.Id String Yes N/A The ID of the nth node instance. n starts from 1. You can specify one or more IDs.

Response parameters

This operation returns only common parameters. For more information, see Common parameters.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.

StartNodes

Start one or more node instances.

Description

You can call this operation to start one or more node instances. After you call the StopNodes operation to stop node instances, you can start node instances again.

Request parameters

Field Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to StartNodes.
RegionId String Yes N/A The ID of the region.
ClusterId String Yes N/A The ID of the cluster.
Instance.n.Id String Yes N/A The ID of the nth node instance. n starts from 1. You can specify one or more IDs.
Role String No Compute The role of the node. Valid values: Manager, Login, and Compute, indicating a cluster management node, a logon node, and a compute node, respectively.

Response parameters

This operation returns only common parameters. For more information, see Common parameters.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.

StopNodes

Stop one or more node instances.

Description

You can call this operation to stop one or more node instances in a cluster. After you stop a node instance, you can call the StartNodes operation to start the node instance again.

Request parameters

Field Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to StopNodes.
RegionId String Yes N/A The ID of the region.
ClusterId String Yes N/A The ID of the cluster.
Instance.n.Id String Yes N/A The ID of the nth node instance. n starts from 1. You can specify one or more IDs.
Role String No Compute The role of the node. Valid values: Manager, Login, and Compute, indicating a cluster management node, a logon node, and a compute node, respectively.

Response parameters

This operation returns only common parameters. For more information, see Common parameters.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.

UpdateQueueConfig

Modify queue configurations of a cluster.

Description

You can call this operation to modify queue configurations of a cluster, including the resource group ID and the instance type of compute nodes.

Request parameters

Parameter Type Required Default value Description
Action String Yes N/A The operation that you want to perform. Set the value to UpdateQueueConfig.
ClusterId String Yes N/A The ID of the cluster.
RegionId String Yes N/A The ID of the region.
QueueName String Yes N/A The name of the queue to which the task belongs.
ResourceGroupId String Yes N/A The ID of the resource group.
ComputeInstanceType String No N/A The instance type of compute nodes.

Response parameters

This operation returns only common parameters. For more information, see common parameters.

Error code

For more information about E-HPC error codes,see Error codes. For a list of error codes, visit the API Error Center.