You can call the DescribeClusterResources operation to query all resources in a specified Container Service for Kubernetes (ACK) cluster.
Debugging
Request syntax
GET /clusters/ClusterId/resources HTTP/1.1
Content-Type:application/json
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
ClusterId | String | Yes | cb95aa626a47740afbf6aa099b65**** |
The ID of the cluster. |
Response syntax
HTTP/1.1 200
Content-Type:application/json
[ {
"cluster_id" : "String",
"created" : "String",
"instance_id" : "String",
"resource_info" : "String",
"resource_type" : "String",
"state" : "String"
} ]
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Array |
The list of resources in the cluster. |
||
cluster_id | String | cb95aa626a47740afbf6aa099b65**** |
The ID of the cluster. |
created | String | 2020-09-11T10:11:54+08:00 |
The time when the resource was created. |
instance_id | String | lb-wz9poz4r0ymh8u0uf**** |
The ID of the resource. |
resource_info | String | {\"Id\":\"k8s_master_slb\",\"Name\":\"k8s_master_slb\",\"Type\":\"ALIYUN::SLB::LoadBalancer\",\"Status\":\"CREATE_COMPLETE\",\"StatusReason\":\"state changed\",\"Updated\":\"2020-05-21T13:25:02\",\"PhysicalId\":\"lb-wz9poz4r0ymh8u0uf****\"} |
The information about the resource. For more information about how to query the source information about the resource, see ListStackResources. |
resource_type | String | ALIYUN::SLB::LoadBalancer |
The type of the resource. |
state | String | CREATE_COMPLETE |
The state of the resource. Valid values:
|
Examples
Sample requests
GET /clusters/cb95aa626a47740afbf6aa099b65****/resources HTTP/1.1
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeClusterResourcesResponse>
<cluster_id>cb95aa626a47740afbf6aa099b65****</cluster_id>
<created>2020-09-11T10:11:54+08:00</created>
<instance_id>lb-wz9poz4r0ymh8u0uf****</instance_id>
<resource_info>{\"Id\":\"k8s_master_slb\",\"Name\":\"k8s_master_slb\",\"Type\":\"ALIYUN::SLB::LoadBalancer\",\"Status\":\"CREATE_COMPLETE\",\"StatusReason\":\"state changed\",\"Updated\":\"2020-05-21T13:25:02\",\"PhysicalId\":\"lb-wz9poz4r0ymh8u0uf****\"}</resource_info>
<resource_type>ALIYUN::SLB::LoadBalancer</resource_type>
<state>CREATE_COMPLETE</state>
<auto_create>1</auto_create>
</DescribeClusterResourcesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
[ {
"cluster_id" : "cb95aa626a47740afbf6aa099b65****",
"created" : "2020-09-11T10:11:54+08:00",
"instance_id" : "lb-wz9poz4r0ymh8u0uf****",
"resource_info" : "{\\\"Id\\\":\\\"k8s_master_slb\\\",\\\"Name\\\":\\\"k8s_master_slb\\\",\\\"Type\\\":\\\"ALIYUN::SLB::LoadBalancer\\\",\\\"Status\\\":\\\"CREATE_COMPLETE\\\",\\\"StatusReason\\\":\\\"state changed\\\",\\\"Updated\\\":\\\"2020-05-21T13:25:02\\\",\\\"PhysicalId\\\":\\\"lb-wz9poz4r0ymh8u0uf****\\\"}",
"resource_type" : "ALIYUN::SLB::LoadBalancer",
"state" : "CREATE_COMPLETE"
} ]
Error codes
For a list of error codes, visit the API Error Center.