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
Test
RAM authorization
|
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.
|
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:
|
c1b542**** |
| resource_type |
string |
The authorization type. Valid values:
|
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 |
| is_owner |
integer |
Indicates whether the permissions are granted to the cluster owner.
|
1 |
| is_ram_role |
integer |
Indicates whether the permissions are granted to the RAM role. Valid values:
|
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.