All Products
Search
Document Center

Container Service for Kubernetes:DescribeSubaccountK8sClusterUserConfig

Last Updated:Apr 22, 2024

You can use an Alibaba Cloud account to call the DescribeSubaccountK8sClusterUserConfig operation to obtain the cluster kubeconfig file of a RAM user or RAM role.

Operation description

**

****Only Alibaba Cloud accounts can call this API operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /k8s/{ClusterId}/users/{Uid}/user_config

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

c5b5e80b0b64a4bf6939d2d8f****
UidstringYes

The ID of the RAM user or RAM role whose cluster kubeconfig file that you want to obtain.

26562443851650****
PrivateIpAddressbooleanNo

Specifies whether to obtain the kubeconfig file used to connect to the cluster over the internal network. Valid values:

  • true: Obtain the kubeconfig file used to connect to the cluster over the internal network.
  • false: Obtain the kubeconfig file used to connect to the cluster over the Internet.

Default value: false.

true
TemporaryDurationMinuteslongNo

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 parameters

ParameterTypeDescriptionExample
object

Schema of Response

configstring

The cluster kubeconfig file. For more information about the content of the kubeconfig file, see Configure cluster credentials.

apiVersion: v1****
expirationstring

The expiration date of the kubeconfig file. The value is the UTC time displayed in RFC3339 format.

2024-03-10T09:56:17Z

Examples

Sample success responses

JSONformat

{
  "config": "apiVersion: v1****",
  "expiration": "2024-03-10T09:56:17Z"
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history