You can call DescribeClusterResources to query all resources in a cluster.

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 the common request header only. For more information, see Common parameters.

Request syntax

GET /clusters/[ClusterId]/resources HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
ClusterId String Yes cb95aa626a47740afbf6aa099b65****

The ID of the cluster.

Response parameters

Parameter Type Example Description
resources Array

A list of resources in the cluster.

instance_id String lb-wz9poz4r0ymh8u0ufehzt

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-wz9poz4r0ymh8u0ufehzt\"}"

The details of the resource. For more information, click here.

resource_type String ALIYUN::SLB::LoadBalancer

The type of the resource.

state String CREATE_COMPLETE

The status of the resource. Valid values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, and ROLLBACK_IN_PROGRESS.

Examples

Sample requests

GET /clusters/[ClusterId]/resources HTTP/1.1
Common request header
{
"ClusterId": "cb95aa626a47740afbf6aa099b65****"
}

Sample success responses

XML format

<0>
    <instance_id>i-wz9aixnfbjo1txoq****</instance_id>
    <resource_type>ALIYUN::ECS::InstanceGroup</resource_type>
    <resource_info>{"Id":"k8s_master_2","Name":"k8s_master_2","Type":"ALIYUN::ECS::InstanceGroup","Status":"CREATE_COMPLETE","StatusReason":"state changed","Updated":"2020-05-21T13:26:04","PhysicalId":"i-wz9aixnfbjo1txoqp339"}</resource_info>
    <created>2020-05-21T21:39:19+08:00</created>
    <auto_create>1</auto_create>
    <state>CREATE_COMPLETE</state>
</0>
<1>
    <instance_id>i-wz976s1is8lo28ue****</instance_id>
    <resource_type>ALIYUN::ECS::InstanceGroup</resource_type>
    <resource_info>{"Id":"k8s_master_3","Name":"k8s_master_3","Type":"ALIYUN::ECS::InstanceGroup","Status":"CREATE_COMPLETE","StatusReason":"state changed","Updated":"2020-05-21T13:26:43","PhysicalId":"i-wz976s1is8lo28uenodp"}</resource_info>
    <created>2020-05-21T21:39:19+08:00</created>
    <auto_create>1</auto_create>
    <state>CREATE_COMPLETE</state>
</1>

JSON format

[
  {
    "instance_id": "i-wz9aixnfbjo1txoq****",
    "resource_type": "ALIYUN::ECS::InstanceGroup",
    "resource_info": "{\"Id\":\"k8s_master_2\",\"Name\":\"k8s_master_2\",\"Type\":\"ALIYUN::ECS::InstanceGroup\",\"Status\":\"CREATE_COMPLETE\",\"StatusReason\":\"state changed\",\"Updated\":\"2020-05-21T13:26:04\",\"PhysicalId\":\"i-wz9aixnfbjo1txoqp339\"}",
    "created": "2020-05-21T21:39:19+08:00",
    "auto_create": 1,
    "state": "CREATE_COMPLETE",
    "dependencies": []
  },
  {
    "instance_id": "i-wz976s1is8lo28ue****",
    "resource_type": "ALIYUN::ECS::InstanceGroup",
    "resource_info": "{\"Id\":\"k8s_master_3\",\"Name\":\"k8s_master_3\",\"Type\":\"ALIYUN::ECS::InstanceGroup\",\"Status\":\"CREATE_COMPLETE\",\"StatusReason\":\"state changed\",\"Updated\":\"2020-05-21T13:26:43\",\"PhysicalId\":\"i-wz976s1is8lo28uenodp\"}",
    "created": "2020-05-21T21:39:19+08:00",
    "auto_create": 1,
    "state": "CREATE_COMPLETE",
    "dependencies": []
  }
]

Error codes

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