Queries Container Service for Kubernetes (ACK) clusters or Serverless Kubernetes clusters in a specified region.

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/k8s_clusters HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
RegionTag String Yes cn-hangzhou

The ID of the region.

CurrentPage Integer No 1

The number of the page to return. Pages start from page 1. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Default value: 1000.

ClusterType Integer No 5

The type of the cluster that you want to query.

Response parameters

Parameter Type Example Description
ClusterPage Struct

The cluster data returned by page.

ClusterList Array of Cluster

The list of clusters.

Cluster
ClusterId String 81453e4b-4df0-4592-****-b835a2ee****

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

ClusterImportStatus Integer 1

The import status of the cluster. Valid values:

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

The name of the cluster.

ClusterStatus Integer 1

The running status of the cluster. Valid values:

  • 1: The cluster is normal.
  • 2: The cluster is abnormal.
  • 3: The cluster is offline.
ClusterType Integer 5

The type of the cluster. Valid values:

  • 2: Elastic Compute Service (ECS) cluster
  • 5: ACK cluster or Serverless Kubernetes cluster
Cpu Integer 4

The total number of CPU cores.

CsClusterId String 2ce62869f4d4466b920312315f05****

The ID of the cluster in ACK.

CsClusterStatus String running

The running status of the ACK cluster. Valid values:

  • initial: The cluster is being initialized.
  • failed: The cluster failed to be created.
  • running: The cluster is running.
  • updating: The cluster is being updated.
  • scaling: The cluster is being scaled out.
  • removing: Nodes are being removed from the cluster.
  • upgrading: The cluster is being upgraded.
  • deleting: The cluster is being deleted.
  • delete_failed: The cluster failed to be deleted.
  • deleted: The cluster is deleted. The state is invisible to users.
Description String test

The description of the cluster.

Mem Integer 2048

The size of total memory. Unit: MB.

NetworkMode Integer 2

The network type of the cluster. Valid values:

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

The number of nodes in the cluster.

RegionId String test

The ID of the namespace to which the cluster belongs.

SubNetCidr String 172.20.0.0/16

The CIDR block of the subnet.

VpcId String vpc-**z1mlwpbjx3e9m**

VPC ID

VswitchId String vsw-bp1uf97****xjxgip****

The ID of the vSwitch.

CurrentPage Integer 1

The page number of the returned page. Default value: 1.

PageSize Integer 10

The number of entries returned per page. Default value: 1000.

TotalSize Integer 5

The total number of pages returned.

Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String C3CE915C-0C83-4AA5-8D66-E8BEED62939E

The ID of the request.

Examples

Sample requests

POST /pop/v5/k8s_clusters HTTP/1.1
Common request header
{
"RegionTag": ""
}

Sample success responses

XML format

<RequestId>C3CE915C-0C83-4AA5-8D66-E8BEED62939E</RequestId>
<Message>success</Message>
<ClusterPage>
    <ClusterList>
        <Cluster>
            <ClusterImportStatus>1</ClusterImportStatus>
            <NodeNum>3</NodeNum>
            <ClusterId>6cd7d5d3-2c7b-48be-a874-3e746708****</ClusterId>
            <Cpu>0</Cpu>
            <ClusterType>5</ClusterType>
            <NetworkMode>2</NetworkMode>
            <CsClusterId>c0b7a530b96d24b46bd02da2316c****</CsClusterId>
            <VswitchId>vsw-bp1y77ga5pz9lianh****</VswitchId>
            <VpcId>vpc-bp1jmhiplgziujhw0****</VpcId>
            <Mem>0</Mem>
            <ClusterName>gray</ClusterName>
            <SubNetCidr>172.20.0.0/16</SubNetCidr>
            <RegionId>cn-hangzhou:test</RegionId>
            <CsClusterStatus>running</CsClusterStatus>
            <ClusterStatus>0</ClusterStatus>
        </Cluster>
    </ClusterList>
    <PageSize>17</PageSize>
    <CurrentPage>0</CurrentPage>
    <TotalSize>17</TotalSize>
</ClusterPage>
<Code>200</Code>

JSON format

{
	"RequestId": "C3CE915C-0C83-4AA5-8D66-E8BEED62939E",
	"Message": "success",
	"ClusterPage": {
		"ClusterList": {
			"Cluster": [
				{
					"ClusterImportStatus": 1,
					"NodeNum": 3,
					"ClusterId": "6cd7d5d3-2c7b-48be-a874-3e746708****",
					"Cpu": 0,
					"ClusterType": 5,
					"NetworkMode": 2,
					"CsClusterId": "c0b7a530b96d24b46bd02da2316c****",
					"VswitchId": "vsw-bp1y77ga5pz9lianh****",
					"VpcId": "vpc-bp1jmhiplgziujhw0****",
					"Mem": 0,
					"ClusterName": "gray",
					"SubNetCidr": "172.20.0.0/16",
					"RegionId": "cn-hangzhou:test",
					"CsClusterStatus": "running",
					"ClusterStatus": 0
				}
			]
		},
		"PageSize": 17,
		"CurrentPage": 0,
		"TotalSize": 17
	},
	"Code": 200
}

Error codes

HttpCode Error code Error message Description
500 Edas.errorcode.PermissionDenied.message You are not authorized to perform the operation. The error message returned because you are not authorized to perform the operation.

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