All Products
Search
Document Center

Container Service for Kubernetes:DescribeUserPermission

Last Updated:Aug 28, 2026

In an Container Service for Kubernetes (ACK) cluster, you can create and specify different Resource Access Management (RAM) users or roles to have different access permissions. This ensures access control and resource isolation. You can call the DescribeUserPermission operation to query the permissions that are granted to a RAM user or RAM role on ACK clusters, including the resources that are allowed to access, the scope of the permissions, the predefined role, and the permission source.

Operation description

Precautions:

  • If you call this operation as a Resource Access Management (RAM) user or by assuming a RAM role, only the permissions granted on the clusters on which the current account has the role-based access control (RBAC) administrator permissions are returned. If you want to query the permissions on all clusters, you must use an account that has the RBAC administrator permissions on all clusters.

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

get

*All Resource

*

None None

Request syntax

GET /permissions/users/{uid} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

uid

string

Yes

The ID of the RAM user or RAM role.

  • If you query RAM user permissions, the UID of the RAM user is used.

  • If you query the permissions of a RAM role, the ID of the RAM role is used.

206945240368******

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

array

The response body.

object

The cluster authorization details of the RAM user.

resource_id

string

The authorization setting. Valid values:

  • {cluster_id} is returned if the permissions are scoped to a cluster.

  • {cluster_id}/{namespace} is returned if the permissions are scoped to a namespace of a cluster.

  • all-clusters is returned if the permissions are scoped to all clusters.

c1b542****

resource_type

string

The authorization type. Valid values:

  • cluster: indicates that the permissions are scoped to a cluster.

  • namespace: indicates that the permissions are scoped to a namespace of a cluster.

  • console: indicates that the permissions are scoped to all clusters.

cluster

role_name

string

The name of the custom role. If a custom role is assigned, the value is the name of the assigned custom role.

terway-pod-reader

role_type

string

The type of predefined role. Valid values:

  • admin: administrator

  • ops: O&M engineer

  • dev: developer

  • restricted: restricted user

  • custom: custom role

admin

is_owner

integer

Indicates whether the permissions are granted to the cluster owner.

  • 0: indicates that the permissions are not granted to the cluster owner.

  • 1: indicates that the permissions are granted to the cluster owner. The cluster owner is the administrator.

1

is_ram_role

integer

Indicates whether the permissions are granted to the RAM role. Valid values:

  • 0: indicates that the permissions are not granted to the RAM role.

  • 1: indicates that the permissions are granted to the RAM role.

1

The parent_id parameter is deprecated. Do not use this parameter.

Examples

Success response

JSON format

[
  {
    "resource_id": "c1b542****",
    "resource_type": "cluster",
    "role_name": "terway-pod-reader",
    "role_type": "admin",
    "is_owner": 1,
    "is_ram_role": 1
  }
]

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.