You can call the ListUserKubeConfigStates operation to query the status of the kubeconfig files of all clusters managed by the current user.
Operation description
To call this operation, make sure that you have the AliyunCSFullAccess permissions.
Try it now
Test
RAM authorization
|
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.
|
2 |
| page_size |
integer |
No |
The number of entries per page.
|
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:
|
Unissued |
| cluster_state |
string |
The status of the cluster. Valid values:
|
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.