All Products
Search
Document Center

Container Service for Kubernetes:DescribeClusterResources

Last Updated:Apr 04, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cs:DescribeClusterResources

get

*Cluster

acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}

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.

  • true: Add-on resources are included.

  • false: Add-on resources are not included.

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: The resource is successfully created.

  • CREATE_FAILED: The resource fails to be created.

  • CREATE_IN_PROGRESS: The resource is being created.

  • DELETE_FAILED: The resource fails to be deleted.

  • DELETE_IN_PROGRESS: The resource is being deleted.

  • ROLLBACK_COMPLETE: The rollback is successful.

  • ROLLBACK_FAILED: The rollback fails.

  • ROLLBACK_IN_PROGRESS: The rollback is in progress.

CREATE_COMPLETE

auto_create

integer

Indicates whether the resource is created by ACK. Valid values:

  • 1: The resource is created by ACK.

  • 0: The resource is an existing resource.

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:

  • true: The resource is deleted by default.

  • false: The resource is not deleted by default.

false

changeable

boolean

Indicates whether the default behavior specified by the delete_by_default parameter can be changed. Valid values:

  • true: The default behavior can be changed.

  • false: The default behavior cannot be changed.

false

creator_type

string

The type of the creator of the resource. Valid values:

  • user: The resource is created by a user.

  • system: The resource is created by the ACK control plane.

  • addon: The resource is created by an add-on.

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.