You can call the DescribeUserPermission operation to query the permissions that are granted to a Resource Access Management (RAM) user or RAM role to manage Container Service for Kubernetes (ACK) clusters.
Debugging
Request syntax
GET /permissions/users/uid HTTP/1.1
Content-Type:application/json
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| uid | String | Yes | 21175**** | The ID of the RAM user or RAM role. Note If you want to query the permissions of a RAM role, specify the ID of the RAM role. |
Response syntax
HTTP/1.1 200 OK
Content-Type:application/json
[ {
"resource_id" : "String",
"resource_type" : "String",
"role_name" : "String",
"role_type" : "String",
"is_owner" : Long,
"is_ram_role" : Long
} ]
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Array | The response body parameters. |
||
| resource_id | String | c1b542**** | The authorization setting. Valid values:
|
| resource_type | String | cluster | The authorization type. Valid values:
|
| role_name | String | view | The name of the custom role. If a custom role is assigned, the value is the name of the assigned custom role. |
| role_type | String | admin | The type of predefined role. Valid values:
|
| is_owner | Long | 1 | Indicates whether the permissions are granted to the cluster owner.
|
| is_ram_role | Long | 1 | Indicates whether the permissions are granted to the RAM role. Valid values:
|
The parent_id parameter is deprecated. Do not use this parameter.
Examples
GET /permissions/users/21175**** HTTP/1.1
Host:cs.aliyuncs.com
Content-Type:application/json
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<0>
<resource_id>c1b542**</resource_id>
<resource_type>cluster</resource_type>
<role_name>view</role_name>
<role_type>admin</role_type>
<is_owner>1</is_owner>
<is_ram_role>1</is_ram_role>
</0>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
[ {
"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, see Service error codes.