Queries clusters.

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 headers

This operation uses only the common request header. For more information, see Common request parameters.

Request syntax

POST /pop/v5/resource/cluster_list HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
LogicalRegionId String Query No cn-beijing:test

The ID of the namespace. You can call the ListUserDefineRegion operation query the namespace ID. For more information see ListUserDefineRegion.

  • If this parameter is left empty, the clusters in the default namespace are queried.
  • If this parameter is specified, the clusters in the specified namespace are queried.
ResourceGroupId String Query No 461

The ID of the resource group. You can call the ListResourceGroup operation to query the resource group ID. For more information, see ListResourceGroup.

  • If this parameter is left empty, the clusters in the default resource group are queried.
  • If this parameter is specified, the clusters in the specified resource group are queried.

Response parameters

Parameter Type Example Description
ClusterList Array of Cluster

The list of clusters.

Cluster
ClusterId String b98b5919-c111-4dad-9f74-7233********

The ID of the cluster in Enterprise Distributed Application Service (EDAS).

ClusterName String cluster-test

The name of the cluster.

ClusterType Integer 2

The type of the cluster. Valid values:

  • 0: normal Docker cluster
  • 1: Swarm cluster
  • 2: Elastic Compute Service (ECS) cluster
  • 3: self-managed Kubernetes cluster in EDAS
  • 4: cluster in which Pandora automatically registers applications
  • 5: Container Service for Kubernetes (ACK) cluster
Cpu Integer 2

The total number of CPU cores.

CpuUsed Integer 1

The number of used CPU cores.

CreateTime Long 1502888064561

The time when the cluster was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

CsClusterId String c2ce************b9203a9

The ID of the cluster in ACK.

Description String Test cluster

The description of the cluster.

IaasProvider String ALIYUN

The provider of the cluster.

Mem Integer 3072

The size of total memory. Unit: MB.

MemUsed Integer 200

The size of used memory. Unit: MB.

NetworkMode Integer 1

The network type of the cluster. Valid values:

  • 1: classic network
  • 2: virtual private cloud (VPC)
NodeNum Integer 2

The number of instances in the cluster.

OversoldFactor Integer 1

The overcommit ratio supported by a Docker cluster. Valid values:

  • 1: 1:1, which means that resources are not overcommitted.
  • 2: 1:2, which means that resources are overcommitted by 1:2.
  • 4: 1:4, which means that resources are overcommitted by 1:4.
  • 8: 1:8, which means that resources are overcommitted by 1:8.
RegionId String cn-beijing

The ID of the region.

ResourceGroupId String 461

The ID of the resource group.

UpdateTime Long 1533820823203

The time when the cluster was last updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

VpcId String vpc-23727****

VPC ID

Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String 1053-08e4-47a5-b2ab-5c0323de****

The ID of the request.

Examples

Sample requests

POST /pop/v5/resource/cluster_list HTTP/1.1
Common request header

Sample success responses

XML format

<ClusterList>
    <Cluster>
        <OversoldFactor>1</OversoldFactor>
        <Description>Test cluster</Description>
        <ResourceGroupId>461</ResourceGroupId>
        <NodeNum>2</NodeNum>
        <ClusterId>b98b5919-c111-4dad-9f74-7233********</ClusterId>
        <CreateTime>1502888064561</CreateTime>
        <Cpu>2</Cpu>
        <NetworkMode>1</NetworkMode>
        <ClusterType>2</ClusterType>
        <CsClusterId>c2ce************b9203a9</CsClusterId>
        <MemUsed>200</MemUsed>
        <Mem>3072</Mem>
        <VpcId>vpc-23727****</VpcId>
        <UpdateTime>1533820823203</UpdateTime>
        <ClusterName>cluster-test</ClusterName>
        <IaasProvider>ALIYUN</IaasProvider>
        <RegionId>cn-beijing</RegionId>
        <CpuUsed>1</CpuUsed>
    </Cluster>
</ClusterList>
<RequestId>1053-08e4-47a5-b2ab-5c0323de****</RequestId>
<Message>success</Message>
<Code>200</Code>

JSON format

{
    "ClusterList": {
        "Cluster": {
            "OversoldFactor": 1,
            "Description": "Test cluster",
            "ResourceGroupId": 461,
            "NodeNum": 2,
            "ClusterId": "b98b5919-c111-4dad-9f74-7233********",
            "CreateTime": 1502888064561,
            "Cpu": 2,
            "NetworkMode": 1,
            "ClusterType": 2,
            "CsClusterId": "c2ce************b9203a9",
            "MemUsed": 200,
            "Mem": 3072,
            "VpcId": "vpc-23727****",
            "UpdateTime": 1533820823203,
            "ClusterName": "cluster-test",
            "IaasProvider": "ALIYUN",
            "RegionId": "cn-beijing",
            "CpuUsed": 1
        }
    },
    "RequestId": "1053-08e4-47a5-b2ab-5c0323de****",
    "Message": "success",
    "Code": 200
}

Error codes

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