Queries the details about a specified 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 headers

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

Request syntax

GET /pop/v5/resource/cluster HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
ClusterId String Query Yes 5439271a-015b-433d-****-d76db49****

The ID of the cluster in Enterprise Distributed Application Service (EDAS). You can call the ListCluster operation to query the cluster ID. For more information, see ListCluster.

Response parameters

Parameter Type Example Description
Cluster Struct

The information about the cluster.

ClusterId String 5439271a-015b-433d-befb-d76db49xxxxx

The ID of the cluster in EDAS.

ClusterImportStatus Integer 0

The import status of the cluster. Valid values:

  • 1: The cluster is imported.
  • 2: The cluster failed to be imported.
  • 3: The cluster is being imported.
  • 4: The cluster is deleted.
  • 0: The cluster is not imported.
ClusterName String ClusterTest

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 4

The total number of CPU cores.

CpuUsed Integer 2

The number of used CPU cores.

CreateTime Long 1570708232145

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 c2ce62869f4d4466b920312315f05****

The ID of the cluster in ACK.

Description String Test

The description of the cluster.

IaasProvider String ALIYUN

The provider of Infrastructure as a Service (IaaS) resources used in the cluster.

Mem Integer 2048

The size of total memory. Unit: MB

MemUsed Integer 1024

The size of used memory.

NetworkMode Integer 2

The network type of the cluster. Valid values:

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

The total number of Elastic Compute Service (ECS) instances in the cluster.

OversoldFactor Integer 2

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

The ID of the region.

UpdateTime Long 1570708232145

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

The ID of the VPC.

Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String d76db491

The ID of the request.

Examples

Sample requests

GET /pop/v5/resource/cluster HTTP/1.1
Common request header
{
  "ClusterId": "5439271a-015b-433d-xxxxxxxx"
}

Sample success responses

XML format

<Message>success</Message>
<Code>200</Code>
<Cluster>
    <MemUsed>2048</MemUsed>
    <Mem>2048</Mem>
    <NetworkMode>2</NetworkMode>
    <UpdateTime>1570708232145</UpdateTime>
    <NodeNum>2</NodeNum>
    <VpcId>vpc-bp19z1mlwpbjx3e9mwefe</VpcId>
    <OversoldFactor>1</OversoldFactor>
    <Cpu>2</Cpu>
    <ClusterId>5439271a-015b-433d-befb-d76db4911b7c</ClusterId>
    <ClusterName>GTSDemoTesting</ClusterName>
    <CreateTime>1561444573420</CreateTime>
    <RegionId>cn-hangzhou</RegionId>
    <CpuUsed>2</CpuUsed>
    <ClusterType>2</ClusterType>
    <IaasProvider>ALIYUN</IaasProvider>
</Cluster>

JSON format

{
	"Message": "success",
	"Code": 200,
	"Cluster": {
		"MemUsed": 2048,
		"Mem": 2048,
		"NetworkMode": 2,
		"UpdateTime": 1570708232145,
		"NodeNum": 2,
		"VpcId": "vpc-xxxxz1mlwxxxx3e9mxxxx",
		"OversoldFactor": 1,
		"Cpu": 2,
		"ClusterId": "xxxxxxa-015b-xxxx-befb-xxxxxxxxx",
		"ClusterName": "xxxDemoTesting",
		"CreateTime": 1561444573420,
		"RegionId": "cn-hangzhou",
		"CpuUsed": 2,
		"ClusterType": 2,
		"IaasProvider": "ALIYUN"
	}
}

Error codes

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