Queries the list of nodes in 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 ListNodes

The operation that you want to perform. Set the value to ListNodes.

ClusterId String Yes ehpc-hz-FYUr32****

The ID of the cluster.

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

Role String No Manager

The type of the node. Valid values:

  • Manager: management node
  • Login: logon node
  • Compute: compute node
HostName String No test-HostName

The name of the node. You can perform a fuzzy search. MySQL regular expressions are supported.

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 100.

Default value: 10

Sequence String No Forward

The sorting method of the node list. Valid values:

  • Forward: sorts the nodes in chronological order.
  • Backward: sorts the nodes in reverse chronological order.

Default value: Forward

Note Sequence is used in combination with SortBy. If SortBy is set to AddedTime and Sequence is set to Forward, nodes are sorted by the time that they were added in chronological order.
SortBy String No AddedTime

The sorting method of the node list. Valid values:

  • AddedTime: sorts the nodes by the time that they were added.
  • HostName: sorts the nodes by their host names.
Filter String No {"status":"running"}

The filter options of the node list.

Format: {"status":"node_status"}. Replace node_status with the node status. Valid values of node_status:

  • uninit: The node is being installed.
  • exception: An exception has occurred on the node.
  • running: The node is running.
  • initing: The node is being initialized.
  • releasing: The node is being released.
  • untracking: The node is not added to the cluster.
  • stopped: The node is stopped.
PrivateIpAddress String No 172.16.**.**

The private IP address of the node.

HostNamePrefix String No compute

The prefix of the hostname. You can query nodes that have a specified prefix.

HostNameSuffix String No 01

The suffix of the hostname. You can query nodes that have a specified suffix.

Response parameters

Parameter Type Example Description
PageSize Integer 1

The number of entries returned per page.

RequestId String 89A1AC0F-4A6C-4F3D-98F9-BEF9A823****

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

TotalCount Integer 1

The total number of returned entries.

Nodes Array of NodeInfo

The information about nodes.

NodeInfo
VpcId String vpc-bp1gnu8br4ay7beb2w****

The ID of the virtual private cloud (VPC).

Status String running

The status of the node. Valid values:

  • uninit: The node is being installed.
  • exception: An exception has occurred on the node.
  • running: The node is running.
  • initing: The node is being initialized.
  • releasing: The node is being released.
  • untracking: The node is not added to the cluster.
  • stopped: The node is stopped.
HtEnabled Boolean true

Indicates whether hyper-threading is enabled.

Expired Boolean false

Indicates whether the subscription node expired. For a pay-as-you-go node, false is returned.

ImageOwnerAlias String system

The type of the image. Valid values:

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

The reason why the node was locked. Valid values:

  • financial: The node is locked due to overdue payments.
  • security: The node is locked for security reasons.
  • recycling: The preemptible node is locked and pending release.
  • dedicatedhostfinancial: The node is locked due to the overdue payments of the dedicated host.

By default, an empty string is returned.

HostName String test-HostName

The name of the node.

InstanceType String ecs.c5.large

The instance types of the node.

PublicIpAddress String 172.16.**.**

The public IP address of the node.

SpotStrategy String NoSpot

The bidding method of the compute nodes.

CreatedByEhpc Boolean true

Indicates whether the node was created by using E-HPC.

  • true: The node is created by using E-HPC.
  • false: The node is not created by using E-HPC.
RegionId String cn-hangzhou

The ID of the region.

VSwitchId String vsw-bp1e47optm9g58zcu****

The ID of the vSwitch.

IpAddress String 172.16.**.**

The IP address of the node.

ExpiredTime String 2020-06-09T06:22:02.000Z

The time when the subscription node expires. For a pay-as-you-go node, a null value is returned.

Version String 1.0.78

The version of the client.

ZoneId String cn-hangzhou-b

The ID of the zone.

AddTime String 2020-06-09T06:22:02.000Z

The time when the node was added to the cluster.

ImageId String centos_7_06_64_20G_alibase_20190711.vhd

The ID of the image.

Location String PublicCloud

The location where the node was deployed. Valid values:

  • OnPremise: The node is deployed on your data center.
  • PublicCloud: The node is deployed on the public cloud.
Id String i-bp15707mys2rsy0j****

The ID of the node.

CreateMode String 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.
Roles Array of String ["Compute"]

The type of the node. Valid values:

  • Scheduler: primary scheduling node
  • SchedulerBackup: secondary scheduling node
  • Account: primary domain server node
  • AccountBackup: secondary domain server node
  • Login: logon node
  • Compute: compute node

Scheduling nodes and domain server nodes are management nodes.

TotalResources Object

The statistics of the resources used by the node.

Gpu Integer 0

The number of GPUs.

Cpu Integer 1

The number of vCPUs.

Memory Integer 1024

The memory capacity. Unit: GB

UsedResources Object

The usage of the compute nodes in the cluster. For other types of nodes, an empty value is returned.

Gpu Integer 0

The number of GPUs.

Cpu Integer 0

The number of vCPUs.

Memory Integer 0

The memory capacity. Unit: GB

StateInSched String active

The status of the node displayed on the scheduler. The status varies with the scheduler.

Examples

Sample requests

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListNodes
&ClusterId=ehpc-hz-FYUr32****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListNodesResponse>
    <PageSize>1</PageSize>
    <RequestId>89A1AC0F-4A6C-4F3D-98F9-BEF9A823****</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>1</TotalCount>
    <Nodes>
        <VpcId>vpc-bp1gnu8br4ay7beb2w****</VpcId>
        <Status>running</Status>
        <HtEnabled>true</HtEnabled>
        <Expired>false</Expired>
        <ImageOwnerAlias>system</ImageOwnerAlias>
        <LockReason>financial</LockReason>
        <HostName>test-HostName</HostName>
        <InstanceType>ecs.c5.large</InstanceType>
        <PublicIpAddress>172.16.**.**</PublicIpAddress>
        <SpotStrategy>NoSpot</SpotStrategy>
        <CreatedByEhpc>true</CreatedByEhpc>
        <RegionId>cn-hangzhou</RegionId>
        <VSwitchId>vsw-bp1e47optm9g58zcu****</VSwitchId>
        <IpAddress>172.16.**.**</IpAddress>
        <ExpiredTime>2020-06-09T06:22:02.000Z</ExpiredTime>
        <Version>1.0.78</Version>
        <ZoneId>cn-hangzhou-b</ZoneId>
        <AddTime>2020-06-09T06:22:02.000Z</AddTime>
        <ImageId>centos_7_06_64_20G_alibase_20190711.vhd</ImageId>
        <Location>PublicCloud</Location>
        <Id>i-bp15707mys2rsy0j****</Id>
        <CreateMode>manual</CreateMode>
        <Roles>[“Compute”]</Roles>
        <TotalResources>
            <Gpu>0</Gpu>
            <Cpu>1</Cpu>
            <Memory>1024</Memory>
        </TotalResources>
        <UsedResources>
            <Gpu>0</Gpu>
            <Cpu>0</Cpu>
            <Memory>0</Memory>
        </UsedResources>
        <StateInSched>active</StateInSched>
    </Nodes>
</ListNodesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 1,
  "RequestId" : "89A1AC0F-4A6C-4F3D-98F9-BEF9A823****",
  "PageNumber" : 1,
  "TotalCount" : 1,
  "Nodes" : [ {
    "VpcId" : "vpc-bp1gnu8br4ay7beb2w****",
    "Status" : "running",
    "HtEnabled" : true,
    "Expired" : false,
    "ImageOwnerAlias" : "system",
    "LockReason" : "financial",
    "HostName" : "test-HostName",
    "InstanceType" : "ecs.c5.large",
    "PublicIpAddress" : "172.16.**.**",
    "SpotStrategy" : "NoSpot",
    "CreatedByEhpc" : true,
    "RegionId" : "cn-hangzhou",
    "VSwitchId" : "vsw-bp1e47optm9g58zcu****",
    "IpAddress" : "172.16.**.**",
    "ExpiredTime" : "2020-06-09T06:22:02.000Z",
    "Version" : "1.0.78",
    "ZoneId" : "cn-hangzhou-b",
    "AddTime" : "2020-06-09T06:22:02.000Z",
    "ImageId" : "centos_7_06_64_20G_alibase_20190711.vhd",
    "Location" : "PublicCloud",
    "Id" : "i-bp15707mys2rsy0j****",
    "CreateMode" : "manual",
    "Roles" : [ "[“Compute”]" ],
    "TotalResources" : {
      "Gpu" : 0,
      "Cpu" : 1,
      "Memory" : 1024
    },
    "UsedResources" : {
      "Gpu" : 0,
      "Cpu" : 0,
      "Memory" : 0
    },
    "StateInSched" : "active"
  } ]
}

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 is not activated for your account.
404 ClusterNotFound The specified cluster does not exist. The error message returned because the specified cluster 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.
406 EcsError An error occurred while calling the ECS API operation. The error message returned because the ECS API call has failed.
406 DbError A database service error occurred. The error message returned because the database request has failed.
406 RedisError A Redis service error occurred. The error message returned because the Redis request has failed.
406 AgentError The agent service request failed. The error message returned because the proxy 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.
407 NotAuthorized You are not authorized by RAM for this request. The error message returned because you are not authorized by RAM for this request.
500 UnknownError An unknown error occurred. The error message returned because an unknown error has occurred. Try again later. If the error persists, submit a ticket.
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.