You can call the DescribeClustersV1 operation to query the details about all Container Service for Kubernetes (ACK) clusters.
Debugging
Authorization information
Request syntax
GET /api/v1/clusters
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
name | string | No | The cluster name. The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). The name cannot start with a hyphen (-). | cluster-demo |
cluster_type | string | No | The cluster type. Valid values:
| Kubernetes |
page_size | long | No | The number of entries per page. | 10 |
page_number | long | No | The page number. | 3 |
profile | string | No | The identifier of the cluster. Valid values when the cluster_type parameter is set to
Valid values when the cluster_type parameter is set to
By default, this parameter is left empty. If you leave this parameter empty, ACK clusters are not filtered by identifier. | Default |
cluster_spec | string | No | The cluster type, which is available only when the cluster type is set to
By default, this parameter is left empty, which means that ACK clusters are not filtered by this parameter. | ack.pro.small |
region_id | string | No | The region ID of the clusters. You can use this parameter to query all clusters in the specified region. | cn-hangzhou |
Response parameters
Examples
Sample success responses
JSON
format
{
"clusters": [
{
"cluster_id": "c3fb96524f9274b4495df0f12a6b5****",
"cluster_type": "Kubernetes",
"created": "2020-08-20T10:51:29+08:00",
"init_version": "1.16.9-aliyun.1",
"current_version": "1.16.9-aliyun.1",
"next_version": "1.18.8-aliyun.1",
"deletion_protection": true,
"docker_version": "19.03.5",
"external_loadbalancer_id": "lb-2vcrbmlevo6kjpgch****",
"master_url": "{\\\"api_server_endpoint\\\":\\\"\\\",\\\"intranet_api_server_endpoint\\\":\\\"https://192.168.0.251:6443\\\"}",
"meta_data": "{\\\"Addons\\\":[{\\\"config\\\":***}",
"name": "cluster-demo",
"network_mode": "vpc",
"private_zone": false,
"profile": "Default",
"region_id": "cn-beijing",
"resource_group_id": "rg-acfmyvw3wjm****",
"security_group_id": "sg-2vcgwsrwgt5mp0yi****",
"size": 5,
"state": "running",
"subnet_cidr": "172.21.0.0/16",
"tags": [
{
"key": "env",
"value": "prod"
}
],
"updated": "2020-09-16T11:09:55+08:00",
"vpc_id": "vpc-2vcg932hsxsxuqbgl****",
"vswitch_id": "vsw-2vc41xuumx5z2rdma****,vsw-2vc41xuumx5z2rdma****",
"worker_ram_role_name": "KubernetesWorkerRole-ec87d15b-edca-4302-933f-c8a16bf0****",
"zone_id": "cn-beijing-b",
"cluster_spec": "ack.standard",
"maintenance_window": {
"enable": false,
"maintenance_time": "03:00:00Z",
"duration": "3h",
"weekly_period": "Monday,Thursday"
}
}
],
"page_info": {
"page_number": 3,
"page_size": 20,
"total_count": 50
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2023-11-24 | The request parameters of the API has changed | see changesets | ||||
| ||||||
2020-09-14 | The request parameters of the API has changed | see changesets | ||||
|