All Products
Search
Document Center

Container Service for Kubernetes:DescribeUserPermission

Last Updated:Feb 29, 2024

You can call the DescribeUserPermission operation to query the permissions that are granted to a RAM user to manage clusters.

Debugging

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

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cs:GetUserPermissionsRead
  • All Resources
    *
    none
none

Request syntax

GET /permissions/users/{uid}

Request parameters

ParameterTypeRequiredDescriptionExample
uidstringYes

The ID of the RAM user or RAM role.

Note If you want to grant permissions to a RAM role, enter the ID of the RAM role.
21175****

Response parameters

ParameterTypeDescriptionExample
object []

The response body.

resource_idstring

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_typestring

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. This value was displayed only in the console.
cluster
role_namestring

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

view
role_typestring

The type of predefined role. Valid values:

  • admin: administrator
  • ops: O&M engineer
  • dev: developer
  • restricted: restricted user
  • custom: custom role
admin
is_ownerlong

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_rolelong

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

Examples

Sample success responses

JSONformat

[
  {
    "resource_id": "c1b542****",
    "resource_type": "cluster",
    "role_name": "view",
    "role_type": "admin",
    "is_owner": 1,
    "is_ram_role": 1
  }
]

Error codes

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

Change history

Change timeSummary of changesOperation
No change history