All Products
Search
Document Center

:DescribeClusters

Last Updated:Jan 26, 2026

Queries all the clusters that belong to the current Alibaba Cloud account, including Kubernetes clusters and Swarm clusters.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cs:GetClustersget
*Cluster
acs:cs:*:{#accountId}:cluster/*
    none
none

Request syntax

GET /clusters HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
namestringNo

The cluster name based on which the system performs fuzzy searches among the clusters that belong to the current Alibaba Cloud account.

test
clusterTypestringNo

The cluster type.

ManagedKubernetes

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

348D4C9C-9105-4A1B-A86E-B58F0F875575
clustersarray<object>

The information about the clusters returned.

clusterDetailobject
createdstring

The time when the cluster was created.

2019-11-25T15:50:20+08:00
security_group_idstring

The ID of the security group to which the cluster belongs.

sg-2zedf74ifulatvx0****
docker_versionstring

The version of Docker.

18.09.2
master_urlstring

The endpoints that are open for connections to the cluster. The endpoints include api_server_endpoint, dashboard_endpoint, mirana_endpoint, reverse_tunnel_endpoint, and intranet_api_server_endpoint. For more information, see Use SSH to connect to a cluster.

"{\"api_server_endpoint\":\"https://47.93.xx.xxx:6443https://mirana.cs-cn-beijing.aliyuncs.com:4243https://192.xxx.x.xx:6443\"}", "external_loadbalancer_id": "lb-2ze3buguz3gx9920z****"
meta_datastring

The metadata of the cluster.

***
cluster_idstring

The cluster ID.

cb95aa626a47740afbf6aa099b650****
external_loadbalancer_idstring

The ID of the Server Load Balancer (SLB) instance that is associated with the cluster.

lb-2ze3buguz3gx9920z****
network_modestring

The network type of the cluster. A value of vpc indicates that the cluster uses a virtual private cloud (VPC).

vpc
zone_idstring

The ID of the zone where the cluster is deployed.

cn-beijing-a
deletion_protectionboolean

Indicates whether deletion protection is enabled for the cluster. If deletion protection is enabled, the cluster cannot be deleted by operations in the console or API operations.

true
current_versionstring

The Kubernetes version of the cluster.

1.14.8-aliyun.1
updatedstring

The time when the cluster was last updated.

2020-01-13T23:01:03+08:00
resource_group_idstring

The ID of the resource group to which the cluster belongs.

rg-acfmyvw3wjm****
cluster_typestring

The cluster type.

Kubernetes
region_idstring

The region ID of the cluster.

cn-beijing
vpc_idstring

The VPC ID of the cluster.

vpc-2zecuu62b9zw7a7qn****
data_disk_sizeinteger

The data disk size. Unit: GB.

0
statestring

The cluster status. Valid values: running, filed, and stopped. A value of running indicates that the cluster is running as expected. A value of filed or stopped indicates that the cluster is in the abnormal state.

running
sizeinteger

The number of nodes in the cluster.

4
vswitch_idstring

The vSwitch ID.

vsw-2zete8s4qocqg0mf6****
vswitch_cidrstring

The prefix length of the CIDR block that is assigned to the vSwitch.

"26"
namestring

The cluster name.

my-test-Kubernetes-cluster
data_disk_categorystring

The category of the data disk.

cloud
tagsarray<object>

The labels of the cluster.

tagsobject
keystring

The key of the label.

2
valuestring

The value of the label.

3

Examples

Sample success responses

JSONformat

{
  "RequestId": "348D4C9C-9105-4A1B-A86E-B58F0F875575",
  "clusters": [
    {
      "created": "2019-11-25T15:50:20+08:00",
      "security_group_id": "sg-2zedf74ifulatvx0****",
      "docker_version": "18.09.2",
      "master_url": "\"{\\\"api_server_endpoint\\\":\\\"https://47.93.xx.xxx:6443https://mirana.cs-cn-beijing.aliyuncs.com:4243https://192.xxx.x.xx:6443\\\"}\",   \"external_loadbalancer_id\": \"lb-2ze3buguz3gx9920z****\"",
      "meta_data": "***",
      "cluster_id": "cb95aa626a47740afbf6aa099b650****",
      "external_loadbalancer_id": "lb-2ze3buguz3gx9920z****",
      "network_mode": "vpc",
      "zone_id": "cn-beijing-a",
      "deletion_protection": true,
      "current_version": "1.14.8-aliyun.1",
      "updated": "2020-01-13T23:01:03+08:00",
      "resource_group_id": "rg-acfmyvw3wjm****",
      "cluster_type": "Kubernetes",
      "region_id": "cn-beijing",
      "vpc_id": "vpc-2zecuu62b9zw7a7qn****",
      "data_disk_size": 0,
      "state": "running",
      "size": 4,
      "vswitch_id": "vsw-2zete8s4qocqg0mf6****",
      "vswitch_cidr": 26,
      "name": "my-test-Kubernetes-cluster",
      "data_disk_category": "cloud",
      "tags": [
        {
          "key": 2,
          "value": 3
        }
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-25The request parameters of the API has changedView Change Details