Queries or issues the kubeconfig credentials of a Resource Access Management (RAM) user or RAM role of the account. If you are the permission manager of a Container Service for Kubernetes (ACK) cluster, you can issue the kubeconfig credentials to a specific RAM user or RAM role of the account by using the Alibaba Cloud account. The kubeconfig credentials, which are used to connect to the ACK cluster, contain the identity information about the RAM user or RAM role.
Operation description
You can call this operation only by using an Alibaba Cloud account.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:DescribeSubaccountK8sClusterUserConfig |
get |
*Cluster
|
None | None |
Request syntax
GET /k8s/{ClusterId}/users/{Uid}/user_config HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. |
c5b5e80b0b64a4bf6939d2d8f**** |
| Uid |
string |
Yes |
The ID of the RAM user or RAM role whose cluster kubeconfig file that you want to obtain. |
26562443851650**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PrivateIpAddress |
boolean |
No |
Specifies whether to obtain the kubeconfig file used to connect to the cluster over the internal network. Valid values:
Default value: |
false |
| TemporaryDurationMinutes |
integer |
No |
The validity period of the temporary kubeconfig file. Unit: minutes. Valid values: 15 to 4320 (three days). Note
If you leave this parameter empty, the system sets a longer validity period and returns the value in the expiration parameter of the response. |
15 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| config |
string |
The cluster kubeconfig file. For more information about how to view the kubeconfig file content, see Configure cluster credentials. |
apiVersion: v1\nclusters:\n- cluster:\n server: https://114.55.xx.xx:6443\n certificate-authority-data: LS0tLS**** |
| expiration |
string |
The expiration date of the kubeconfig file. The value is the UTC time displayed in RFC3339 format. |
2028-04-09T06:20:47Z |
Examples
Success response
JSON format
{
"config": "apiVersion: v1\\nclusters:\\n- cluster:\\n server: https://114.55.xx.xx:6443\\n certificate-authority-data: LS0tLS****",
"expiration": "2028-04-09T06:20:47Z"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.