All Products
Search
Document Center

Container Service for Kubernetes:ListUserKubeConfigStates

Last Updated:Aug 28, 2026

You can call the ListUserKubeConfigStates operation to query the status of the kubeconfig files of all clusters managed by the current user.

Operation description

Note

To call this operation, make sure that you have the AliyunCSFullAccess permissions.

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:ListUserKubeConfigStates

none

*All Resource

*

None None

Request syntax

GET /users/{Uid}/kubeconfig/states HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

Uid

string

No

The ID of the specified Resource Access Management (RAM) user or RAM role within the Alibaba Cloud account.

206945240368******

Request parameters

Parameter

Type

Required

Description

Example

page_number

integer

No

The page number.

  • Valid values: ≥ 1.

  • Default value: 1.

2

page_size

integer

No

The number of entries per page.

  • Value values: 1 to 100.

  • Default value: 50.

10

Response elements

Element

Type

Description

Example

object

The response body parameters.

states

array<object>

The status of the kubeconfig files.

object

cluster_id

string

The cluster ID.

c5b5e80b0b64a4bf6939d2d8fbbc5****

cert_expire_time

string

The expiration date of the certificate used in a kubeconfig file. Format: the UTC time in the RFC3339 format.

2028-04-09T06:20:47Z

cert_state

string

The current status of the certificate used in a kubeconfig file. Valid values:

  • Expired: The certificate is expired.

  • Unexpired: The certificate is not expired.

  • Unissued: The certificate is not issued.

  • Unknown: The status of the certificate is unknown.

  • Removed: The certificate is removed. An issue record is found for the certificate.

Unissued

cluster_state

string

The status of the cluster. Valid values:

  • initial: The cluster is being created.

  • failed: The cluster failed to be created.

  • running: The cluster is running.

  • updating: The cluster is being upgraded.

  • updating_failed: The cluster failed to be updated.

  • scaling: The cluster is being scaled.

  • stopped: The cluster is stopped.

  • deleting: The cluster is being deleted.

  • deleted: The cluster is deleted.

  • delete_failed: The cluster failed to be deleted.

running

cluster_name

string

The name of the cluster.

The name must be 1 to 63 characters in length, and can contain digits, underscores (_), and hyphens (-). The name must start with a letter or number.

cluster-demo

page

object

The pagination information.

page_number

integer

The page number of the returned page.

1

page_size

integer

The number of entries per page.

10

total_count

integer

The total number of entries returned.

100

Examples

Success response

JSON format

{
  "states": [
    {
      "cluster_id": "c5b5e80b0b64a4bf6939d2d8fbbc5****\n",
      "cert_expire_time": "2028-04-09T06:20:47Z",
      "cert_state": "Unissued",
      "cluster_state": "running",
      "cluster_name": "cluster-demo"
    }
  ],
  "page": {
    "page_number": 1,
    "page_size": 10,
    "total_count": 100
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.