You can call the DescribeClusterResources operation to query all resources in a cluster by cluster ID.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
GET /clusters/{ClusterId}/resources
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. For more information about how to query cluster IDs, see View cluster information. You can also call the DescribeClustersV1 API operation to query all clusters that belong to an Alibaba Cloud account. | cb95aa626a47740afbf6aa099b65**** |
with_addon_resources | boolean | No | Specifies whether to query the resources created by cluster components. |
Response parameters
Examples
Sample success responses
JSON
format
[
{
"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",
"auto_create": 1,
"dependencies": {
"test": "test",
"test2": 1
},
"associated_object": {
"kind": "Service",
"namespace": "kube-system",
"name": "nginx-ingress-lb"
},
"delete_behavior": {
"delete_by_default": false,
"changeable": false
},
"creator_type": "addon",
"extra_info": {
"IP": "xx.xx.xx.xx"
}
}
]
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-03-13 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-10-20 | The response structure of the API has changed | View Change Details |
2023-10-11 | The response structure of the API has changed | View Change Details |
2020-09-10 | The response structure of the API has changed | View Change Details |