All Products
Search
Document Center

Container Service for Kubernetes:DescribeSubaccountK8sClusterUserConfig

Last Updated:Aug 27, 2026

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

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

get

*Cluster

acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}

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:

  • 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.

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.