View all clusters

Last Updated: May 21, 2018

Description

View all the clusters you have created in Container Service, including swarm clusters and Kubernetes clusters.

Request information

Request line (RequestLine)

  1. GET /clusters HTTP/1.1

Special request header (RequestHead)

None. See Public request headers.

Request body (RequestBody)

None.

Response information

Response line (ResponseLine)

  1. HTTP/1.1 200 OK

Special response header (ResponseHead)

None. See Public response headers.

Response body (ResponseBody)

  1. [
  2. {
  3. "agent_version": "string",
  4. "cluster_id": "string",
  5. "created": "datetime",
  6. "external_loadbalancer_id": "string",
  7. "master_url": "string",
  8. "name": "string",
  9. "network_mode": "string",
  10. "region_id": "string",
  11. "security_group_id": "string",
  12. "size": "numbers",
  13. "state": "string",
  14. "updated": "datetime",
  15. "vpc_id": "string",
  16. "vswitch_id": "string"
  17. }
  18. ]

Response body explanation

Cluster format

Name Type Description
agent_versionstringThe Agent version.
cluster_id stringThe cluster ID, which is the unique identifier of the cluster.
createdstringThe created time of the cluster.
external_loadbalancer_idstringThe Server Load Balancer instance ID of the cluster.
master_urlstringThe master address of the cluster, which is used to connect to the cluster to perform operations. For more information, see Connect to a cluster by using Docker tools.
namestringThe cluster name, which is specified when you create the cluster and is unique for each account.
network_modestringThe network mode of the cluster (Virtual Private Cloud (VPC)).
region_id stringThe ID of the region in which the cluster resides. For more information, see Regions.
security_group_idstringThe security group ID.
sizestringThe number of nodes.
statestringThe cluster status. For more information, see Cluster lifecycle.
updated stringLast updated time.
vpc_idstringVPC ID.
vswitch_id stringVSwitch ID.

Example

Request example

  1. GET /clusters HTTP/1.1
  2. <Public request headers>

Return example

  1. HTTP/1.1 200 OK
  2. <Public response header>
  3. [
  4. {
  5. "agent_version": "0.5-e56dab3",
  6. "cluster_id": "c978ca3eaacd3409a9437db07598f1f69",
  7. "created": "2015-12-11T03:52:40Z",
  8. "external_loadbalancer_id": "1518f2b7e4c-cn-beijing-btc-a01",
  9. "master_url": "https://182.92.245.56:17589",
  10. "name": "my-python-cluster-039de960",
  11. "network_mode": "vpc",
  12. "region_id": "cn-beijing",
  13. "security_group_id": "sg-25yqjuxhz",
  14. "size": 5,
  15. "state": "running",
  16. "updated": "2015-12-15T15:01:58Z",
  17. "vpc_id": "",
  18. "vswitch_id": ""
  19. },
  20. {
  21. "agent_version": "0.5-e56dab3",
  22. "cluster_id": "c1eb19e0093204cbb86c3a80334d2129e",
  23. "created": "2015-12-15T14:26:58Z",
  24. "external_loadbalancer_id": "151a6099de1-cn-beijing-btc-a01",
  25. "master_url": "https://182.92.245.56:11905",
  26. "name": "my-test-cluster-002b3f3d",
  27. "network_mode": "vpc",
  28. "region_id": "cn-beijing",
  29. "security_group_id": "sg-25rg2ws9f",
  30. "size": 1,
  31. "state": "running",
  32. "updated": "2015-12-15T14:43:55Z",
  33. "vpc_id": "",
  34. "vswitch_id": ""
  35. }
  36. ]
Thank you! We've received your feedback.