Container Service for Kubernetes uses other Alibaba Cloud resources, such as VPCs and SLBs. To query the resources associated with a specific cluster, call the DescribeClusterResources operation. To query node pools or nodes, call the DescribeClusterNodePools or DescribeClusterNodes operations.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:DescribeClusterResources |
get |
*Cluster
|
None | None |
Request syntax
GET /clusters/{ClusterId}/resources HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. For information about how to view the cluster ID, see View cluster information. You can also call the DescribeClustersV1 operation to query all clusters in your Alibaba Cloud account. |
cb95aa626a47740afbf6aa099b65**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| with_addon_resources |
boolean |
No |
Specifies whether to query resources created by cluster add-ons.
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
array |
A list of resource objects. |
||
|
array<object> |
The details of the resource. |
||
| cluster_id |
string |
The cluster ID. |
cb95aa626a47740afbf6aa099b65**** |
| created |
string |
The time when the resource was created. |
2023-08-15T14:34:42+08:00 |
| instance_id |
string |
The resource ID. |
ngw-wz9sphwk42sdtjixo**** |
| resource_info |
string |
Information about the resource. For more details about its source, see ListStackResources. |
{\"Id\":\"KubernetesWorkerRole\",\"Name\":\"KubernetesWorkerRole\",\"Type\":\"ALIYUN::RAM::Role\",\"Status\":\"CREATE_COMPLETE\",\"StatusReason\":\"state changed\",\"Updated\":\"2025-04-10T06:21:17\",\"PhysicalId\":\"KubernetesWorkerRole-7e611193-225f-40f6-bc3c-ea8633******\"} |
| resource_type |
string |
The resource type. |
ALIYUN::VPC::NatGateway |
| state |
string |
The state of the resource. Valid values:
|
CREATE_COMPLETE |
| auto_create |
integer |
Indicates whether the resource is created by ACK. Valid values:
|
1 |
| dependencies |
array<object> |
The list of dependent resources. |
|
|
object |
The details of the dependent resource. |
||
| cluster_id |
string |
The cluster ID of the dependent resource. |
cc5ee03f63e43425cb6f71f1a1756**** |
| resource_type |
string |
The type of the dependent resource. |
ALIYUN::VPC::NatGateway |
| instance_id |
string |
The instance ID of the dependent resource. |
ngw-wz9sphwk42sdtjixo**** |
| associated_object |
object |
The Kubernetes object that is associated with the resource. |
|
| kind |
string |
The type of the Kubernetes object. |
Service |
| namespace |
string |
The namespace of the Kubernetes object. |
kube-system |
| name |
string |
The name of the Kubernetes object. |
nginx-ingress-lb |
| delete_behavior |
object |
The deletion behavior of the resource when the cluster is deleted. |
|
| delete_by_default |
boolean |
Indicates whether to delete the resource by default when the cluster is deleted. Valid values:
|
false |
| changeable |
boolean |
Indicates whether the default behavior specified by the
|
false |
| creator_type |
string |
The type of the creator of the resource. Valid values:
|
addon |
| extra_info |
object |
Extra information about the resource. |
{ "type": "SLS_Data" } |
Examples
Success response
JSON format
[
{
"cluster_id": "cb95aa626a47740afbf6aa099b65****",
"created": "2023-08-15T14:34:42+08:00",
"instance_id": "ngw-wz9sphwk42sdtjixo****",
"resource_info": "{\\\"Id\\\":\\\"KubernetesWorkerRole\\\",\\\"Name\\\":\\\"KubernetesWorkerRole\\\",\\\"Type\\\":\\\"ALIYUN::RAM::Role\\\",\\\"Status\\\":\\\"CREATE_COMPLETE\\\",\\\"StatusReason\\\":\\\"state changed\\\",\\\"Updated\\\":\\\"2025-04-10T06:21:17\\\",\\\"PhysicalId\\\":\\\"KubernetesWorkerRole-7e611193-225f-40f6-bc3c-ea8633******\\\"}",
"resource_type": "ALIYUN::VPC::NatGateway",
"state": "CREATE_COMPLETE",
"auto_create": 1,
"dependencies": [
{
"cluster_id": "cc5ee03f63e43425cb6f71f1a1756****",
"resource_type": "ALIYUN::VPC::NatGateway",
"instance_id": "ngw-wz9sphwk42sdtjixo****"
}
],
"associated_object": {
"kind": "Service",
"namespace": "kube-system",
"name": "nginx-ingress-lb"
},
"delete_behavior": {
"delete_by_default": false,
"changeable": false
},
"creator_type": "addon",
"extra_info": {
"type": "SLS_Data"
}
}
]
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.