All Products
Search
Document Center

Container Service for Kubernetes:ListUserKubeConfigStates

Last Updated:Feb 28, 2025

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.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cs:ListUserKubeConfigStatesnone
*All Resources
*
    none
none

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
UidstringNo

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

2xxxxxxxxxxxxxxxxxx
page_numberintegerNo

The page number.

  • Valid values: ≥ 1.
  • Default value: 1.
2
page_sizeintegerNo

The number of entries per page.

  • Value values: 1 to 100.
  • Default value: 50.
10

Response parameters

ParameterTypeDescriptionExample
object

The response body parameters.

statesarray<object>

The status of the kubeconfig files.

stateobject
cluster_idstring

The cluster ID.

c5b5e80b0b64a4bf6939d2d8fbbc5****
cert_expire_timestring

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

2026-11-30T07:41:50Z
cert_statestring

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_statestring

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_namestring

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
pageobject

The pagination information.

page_numberinteger

The page number of the returned page.

1
page_sizeinteger

The number of entries per page.

10
total_countinteger

The total number of entries returned.

100

Examples

Sample success responses

JSONformat

{
  "states": [
    {
      "cluster_id": "c5b5e80b0b64a4bf6939d2d8fbbc5****\n",
      "cert_expire_time": "2026-11-30T07:41:50Z",
      "cert_state": "Unissued",
      "cluster_state": "running",
      "cluster_name": "cluster-demo"
    }
  ],
  "page": {
    "page_number": 1,
    "page_size": 10,
    "total_count": 100
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history