Queries the list of clusters in all regions within an account.

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 ListClusters

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

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.

Default: 10

Response parameters

Parameter Type Example Description
Clusters Array of ClusterInfoSimple

The details about the cluster.

ClusterInfoSimple
AccountType String nis

The server type of the account. Valid values:

  • nis
  • ldap
BaseOsTag String CentOS_7.2_64

The image tag of the base operating system. The tag is used only by the management node.

ClientVersion String 1.0.64

The version number of the cluster client.

ComputeSpotPriceLimit Float 0.034

The maximum hourly price for the ECS instance under the compute node. The return value can be accurate to three decimal places.

ComputeSpotStrategy String NoSpot

The bidding policy for the compute nodes. Valid value:

  • NoSpot: The instances of the compute node are pay-as-you-go instances.
  • SpotWithPriceLimit: The instances of the compute node are preemptible instances. These types of instances have a specified maximum hourly price.
  • SpotAsPriceGo: The instances of the compute node are preemptible instances. The price of these instances is based on the current market price.
Computes Struct

The information about compute nodes.

ExceptionCount Integer 0

The number of abnormal nodes.

NormalCount Integer 1

The number of normal nodes.

OperatingCount Integer 1

The number of nodes that are being used in the queue. This includes those that are being initialized, installed, or released.

StoppedCount Integer 0

The number of stopped nodes.

Total Integer 2

The total number of nodes.

Count Integer 3

The number of compute nodes in the cluster.

CreateTime String 2020-10-30T07:39:20.000Z

The time when the cluster is created.

DeployMode String Standard

The mode in which the cluster is deployed. Valid values:

  • Standard: An account node, a scheduler node, a login node, and multiple compute nodes are separately deployed.
  • Advanced: Two high availability (HA) account nodes, two HA scheduler nodes, one login node, and multiple compute nodes are separately deployed.
  • Simple: A cluster management node, a login node, and multiple compute nodes are deployed. The account management and job scheduler services are deployed on the cluster management node.
  • Tiny: The account management, job scheduler, and login services are deployed on a single node. Several compute nodes are separately deployed.
Description String clusterdescription

The description of the cluster.

EhpcVersion String 1.0.0

The version of E-HPC.

Id String ehpc-hz-jeJki6****

The ID of the cluster.

ImageId String wi_1607_x64_dtc_zh_40G_alibase****

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
InstanceChargeType String PostPaid

The billing methods of the instances that are deployed on the cluster. Valid values:

  • PostPaid: pay-as-you-go.
  • PrePaid: subscription.
InstanceType String ecs.n1.tiny

The instance type of the compute nodes.

IsComputeEss Boolean false

Indicates whether the scaling group is enabled. Valid values:

  • true: The scaling group is enabled.
  • false: The scaling group is disabled.
Location String PublicCloud

The location where the cluster is deployed. Valid values:

  • OnPremise: The cluster is deployed on a hybrid cloud.
  • PublicCloud: The cluster is deployed on a public cloud.
LoginNodes String {"Id": "i-bp13x4is8pvdhws7e****"}

The list of login nodes.

Managers Struct

The details about the management nodes.

ExceptionCount Integer 0

The number of abnormal nodes.

NormalCount Integer 1

The number of normal nodes.

OperatingCount Integer 1

The number of nodes that are being used in the queue. This includes those that are being initialized, installed, or released.

StoppedCount Integer 0

The number of stopped nodes.

Total Integer 2

The total number of management nodes.

Name String test

The name of the cluster.

NodePrefix String test

The prefix of the node.

NodeSuffix String name

The suffix of the node.

OsTag String CentOS_7.2_64

The image tag of the operating system.

RegionId String cn-hangzhou

The ID of the region.

SchedulerType String pbs

The type of the scheduler. Valid values:

  • pbs
  • slurm
  • opengridscheduler
  • deadline
Status String running

The status of the cluster. Valid values:

  • uninit: The cluster is not initialized.
  • creating: The cluster is being created.
  • init: The cluster is being initialized.
  • running: The nodes are running.
  • exception: The cluster encounters an exception.
  • releasing: The cluster is being released.
TotalResources Struct

The statistics of all resources in the cluster.

Cpu Integer 1

The number of CPU cores. Unit: cores.

Gpu Integer 0

The number of GPU cards. Unit: cards.

Memory Integer 1024

The memory capacity.

UsedResources Struct

The statistics of consumed resources in the cluster.

Cpu Integer 1

The number of CPU cores. Unit: cores.

Gpu Integer 0

The number of GPU cards. Unit: cards.

Memory Integer 1024

The memory capacity.

VSwitchId String vsw-bp1lfcjbfb099rrjn****

The ID of the vSwitch.

VpcId String vpc-b3f3edefefeep0760yju****

The ID of the virtual private cloud (VPC) to which the instance belongs.

ZoneId String cn-hangzhou-c

The ID of the zone to which the read-only instance belongs.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 1

The number of entries that are returned per page.

RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

TotalCount Integer 1

The total number of entries.

Examples

Sample requests

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListClusters
&<Common request parameters>

Sample responses

XML format

<ListClustersResponse>
      <TotalCount>1</TotalCount>
      <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
      <PageSize>1</PageSize>
      <PageNumber>1</PageNumber>
      <Clusters>
            <ClusterInfoSimple>
                  <ImageOwnerAlias>system</ImageOwnerAlias>
                  <Description>clusterdescription</Description>
                  <NodePrefix>test</NodePrefix>
                  <InstanceChargeType>PostPaid</InstanceChargeType>
                  <ComputeSpotPriceLimit>0.034</ComputeSpotPriceLimit>
                  <NodeSuffix>name</NodeSuffix>
                  <Count>3</Count>
                  <ClientVersion>1.0.64</ClientVersion>
                  <Name>test</Name>
                  <DeployMode>Standard</DeployMode>
                  <TotalResources>
                        <Memory>1024</Memory>
                        <Cpu>1</Cpu>
                        <Gpu>0</Gpu>
                  </TotalResources>
                  <ImageId>wi_1607_x64_dtc_zh_40G_alibase****</ImageId>
                  <InstanceType>ecs.n1.tiny</InstanceType>
                  <IsComputeEss>false</IsComputeEss>
                  <LoginNodes>
                        <Id>i-bp13x4is8pvdhws7e****</Id>
                  </LoginNodes>
                  <Computes>
                        <NormalCount>1</NormalCount>
                        <OperatingCount>0</OperatingCount>
                        <StoppedCount>1</StoppedCount>
                        <Total>2</Total>
                        <ExceptionCount>0</ExceptionCount>
                  </Computes>
                  <Status>running</Status>
                  <ZoneId>cn-hangzhou-c</ZoneId>
                  <VSwitchId>vsw-bp1lfcjbfb099rrjn****</VSwitchId>
                  <CreateTime>2020-10-30T07:39:20.000Z</CreateTime>
                  <SchedulerType>pbs</SchedulerType>
                  <ComputeSpotStrategy>NoSpot</ComputeSpotStrategy>
                  <AccountType>nis</AccountType>
                  <EhpcVersion>1.0.0</EhpcVersion>
                  <BaseOsTag>CentOS_7.2_64</BaseOsTag>
                  <UsedResources>
                        <Memory>1024</Memory>
                        <Cpu>1</Cpu>
                        <Gpu>0</Gpu>
                  </UsedResources>
                  <VpcId>vpc-b3f3edefefeep0760yju****</VpcId>
                  <Managers>
                        <NormalCount>1</NormalCount>
                        <OperatingCount>1</OperatingCount>
                        <StoppedCount>0</StoppedCount>
                        <Total>2</Total>
                        <ExceptionCount>0</ExceptionCount>
                  </Managers>
                  <OsTag>CentOS_7.2_64</OsTag>
                  <Id>ehpc-hz-jeJki6****</Id>
                  <RegionId>cn-hangzhou</RegionId>
                  <Location>PublicCloud</Location>
            </ClusterInfoSimple>
      </Clusters>
</ListClustersResponse>

JSON format

{
    "TotalCount": 1,
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
    "PageSize": 1,
    "PageNumber": 1,
    "Clusters": {
        "ClusterInfoSimple": [
            {
                "ImageOwnerAlias": "system",
                "Description": "clusterdescription",
                "NodePrefix": "test",
                "InstanceChargeType": "PostPaid",
                "ComputeSpotPriceLimit": 0.034,
                "NodeSuffix": "name",
                "Count": 3,
                "ClientVersion": "1.0.64",
                "Name": "test",
                "DeployMode": "Standard",
                "TotalResources": {
                    "Memory": 1024,
                    "Cpu": 1,
                    "Gpu": 0
                },
                "ImageId": "wi_1607_x64_dtc_zh_40G_alibase****",
                "InstanceType": "ecs.n1.tiny",
                "IsComputeEss": false,
                "LoginNodes": [
                    {
                        "Id": "i-bp13x4is8pvdhws7e****"
                    }
                ],
                "Computes": {
                    "NormalCount": 1,
                    "OperatingCount": 0,
                    "StoppedCount": 1,
                    "Total": 2,
                    "ExceptionCount": 0
                },
                "Status": "running",
                "ZoneId": "cn-hangzhou-c",
                "VSwitchId": "vsw-bp1lfcjbfb099rrjn****",
                "CreateTime": "2020-10-30T07:39:20.000Z",
                "SchedulerType": "pbs",
                "ComputeSpotStrategy": "NoSpot",
                "AccountType": "nis",
                "EhpcVersion": "1.0.0",
                "BaseOsTag": "CentOS_7.2_64",
                "UsedResources": {
                    "Memory": 1024,
                    "Cpu": 1,
                    "Gpu": 0
                },
                "VpcId": "vpc-b3f3edefefeep0760yju****",
                "Managers": {
                    "NormalCount": 1,
                    "OperatingCount": 1,
                    "StoppedCount": 0,
                    "Total": 2,
                    "ExceptionCount": 0
                },
                "OsTag": "CentOS_7.2_64",
                "Id": "ehpc-hz-jeJki6****",
                "RegionId": "cn-hangzhou",
                "Location": "PublicCloud"
            }
        ]
    }
}

Error codes

HttpCode Error code Error message Description
400 InvalidParams The specified parameter %s is invalid. The error message returned because the specified parameter %s is invalid. %s
406 EcsError An error occurred while calling the ECS API operation. The error message returned because the ECS API call has failed.
503 ServiceUnavailable The request has failed due to a temporary failure of the server The error message returned because the request has failed. The server is temporarily unavailable.

For a list of error codes, visit the API Error Center.