Queries the permissions of a user on a specific instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ListInstanceUserPermissions |
The operation that you want to perform. Set the value to ListInstanceUserPermissions. |
| Tid | Long | Yes | 3*** |
The ID of the tenant. Note To view the ID of the tenant, move the pointer over the profile picture in the upper-right
corner of the Data Management (DMS) console. For more information, see the "View information
about the current tenant" section of the Manage DMS tenants topic.
|
| InstanceId | String | Yes | 174**** |
The ID of the instance. You can call the ListInstances or GetInstance operation to query the ID of the instance. |
| UserName | String | No | test_nick_name |
The nickname of the user. You can call the ListUsers or GetUser operation to query the nickname of the user. Note The value of the NickName parameter is that of the UserName parameter.
|
| PageNumber | Integer | No | 1 |
The number of the page to return. |
| PageSize | Integer | No | 100 |
The number of entries to return on each page. |
| RegionId | String | No | cn-hangzhou |
The ID of the region in which DMS is activated. For more information about the valid values of this parameter, see RegionID parameter. Note Set this parameter to the ID of the region that is in proximity to your applications.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| TotalCount | Long | 1 |
The total number of returned entries. |
| RequestId | String | 7D162AAE-6501-5691-BF14-D7018F662895 |
The ID of the request. |
| ErrorCode | String | UnknownError |
The error code. |
| ErrorMessage | String | UnknownError |
The error message. |
| UserPermissions | Array of UserPermission |
The permissions of the user on the instance. |
|
| UserPermission | |||
| UserId | String | 51**** |
The ID of the user. |
| UserNickName | String | test_nick_name |
The nickname of the user. |
| InstanceId | String | 174**** |
The ID of the instance. |
| PermDetails | Array of PermDetail |
The details of permissions. |
|
| PermDetail | |||
| OriginFrom | String | Granted by XXX |
The user who grants the permissions. |
| PermType | String | LOGIN |
The type of the permissions. Valid values:
|
| ExpireDate | String | 2020-12-12 00:00:00 |
The time when the permissions expire. |
| CreateDate | String | 2019-12-12 00:00:00 |
The time when the permissions were granted. |
| UserAccessId | String | 773**** |
The ID of the authorization record. |
| ExtraData | String | XXX |
This parameter is reserved. |
| Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=ListInstanceUserPermissions
&InstanceId=174****
&UserName=test_nick_name
&PageNumber=1
&PageSize=100
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListInstanceUserPermissionsResponse>
<TotalCount>1</TotalCount>
<RequestId>7D162AAE-6501-5691-BF14-D7018F662895</RequestId>
<ErrorCode>UnknownError</ErrorCode>
<ErrorMessage>UnknownError</ErrorMessage>
<UserPermissions>
<UserId>51****</UserId>
<UserNickName>test_nick_name</UserNickName>
<InstanceId>174****</InstanceId>
<PermDetails>
<OriginFrom>Granted by XXX</OriginFrom>
<PermType>LOGIN</PermType>
<ExpireDate>2020-12-12 00:00:00</ExpireDate>
<CreateDate>2019-12-12 00:00:00</CreateDate>
<UserAccessId>773****</UserAccessId>
<ExtraData>XXX</ExtraData>
</PermDetails>
</UserPermissions>
<Success>true</Success>
</ListInstanceUserPermissionsResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 1,
"RequestId" : "7D162AAE-6501-5691-BF14-D7018F662895",
"ErrorCode" : "UnknownError",
"ErrorMessage" : "UnknownError",
"UserPermissions" : [ {
"UserId" : "51****",
"UserNickName" : "test_nick_name",
"InstanceId" : "174****",
"PermDetails" : [ {
"OriginFrom" : "Granted by XXX",
"PermType" : "LOGIN",
"ExpireDate" : "2020-12-12 00:00:00",
"CreateDate" : "2019-12-12 00:00:00",
"UserAccessId" : "773****",
"ExtraData" : "XXX"
} ]
} ],
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.