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.

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
Nodes Array of NodeInfo

The information about nodes.

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

The time when the node was added to the cluster.

CreateMode String manual

The mode in which the node was added. Valid values:

  • manual: The node is manually added.
  • autoscale: The node is automatically added.
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.
Expired Boolean false

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

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.

HostName String test-HostName

The name of the node.

HtEnabled Boolean true

Indicates whether hyper-threading is enabled.

Id String i-bp15707mys2rsy0j****

The ID of the node.

ImageId String centos_7_06_64_20G_alibase_20190711.vhd

The ID of the image.

ImageOwnerAlias String system

The type of the image. Valid values:

  • system: public image
  • self: custom image
  • others: shared image
  • marketplace: Alibaba Cloud Marketplace image
InstanceType String ecs.c5.large

The instance type of the node.

IpAddress String 172.16.**.**

The IP address of the node.

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

PublicIpAddress String 172.16.**.**

The public IP address of the node.

RegionId String cn-hangzhou

The ID of the region where the cluster resides.

Roles List ["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.

SpotStrategy String NoSpot

The bidding method of the compute nodes.

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.
TotalResources Struct

The statistics of the resources used by the node.

Cpu Integer 1

The number of CPU cores.

Gpu Integer 0

The number of GPUs.

Memory Integer 1024

The memory capacity. Unit: GB

UsedResources Struct

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

Cpu Integer 0

The number of CPU cores.

Gpu Integer 0

The number of GPUs.

Memory Integer 0

The memory capacity. Unit: GB

VSwitchId String vsw-bp1e47optm9g58zcu****

The ID of the vSwitch.

Version String 1.0.78

The version of the client.

VpcId String vpc-bp1gnu8br4ay7beb2w****

The ID of the virtual private cloud (VPC).

ZoneId String cn-hangzhou-b

The ID of the zone where the cluster resides.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 1

The number of entries returned per page.

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

The ID of the request.

TotalCount Integer 1

The number of returned entries.

Examples

Sample requests

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

Sample success responses

XML format

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

JSON format

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

Error codes

HttpCode Error code Error message Description
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.