Queries the details of user permissions for a specified database.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:ListDatabaseUserPermssions |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Tid |
integer |
No |
The tenant ID. Note
You can obtain the tenant ID by moving the pointer over the profile picture in the upper-right corner of the console. For more information, see View tenant information. |
-1 |
| PermType |
string |
Yes |
The permission type. Valid values:
|
DATABASE |
| DbId |
string |
Yes |
The database ID. |
123 |
| Logic |
boolean |
No |
Specifies whether the database is a logical database. |
false |
| UserName |
string |
No |
The nickname of the user. |
search_user_name |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of entries that meet the conditions. |
1 |
| RequestId |
string |
The request ID. |
68075D06-7406-4887-83A7-F558A4D28C13 |
| ErrorCode |
string |
The error code. |
UnknownError |
| ErrorMessage |
string |
The error message. |
UnknownError |
| UserPermissions |
object |
||
| UserPermission |
array<object> |
The details of the user permissions. |
|
|
array<object> |
|||
| DbId |
string |
The database ID. |
1234 |
| TableName |
string |
The table name. |
table_name |
| UserId |
string |
The user ID. |
14324 |
| SchemaName |
string |
The database name. |
xxx@xxxx:3306 |
| Logic |
boolean |
Specifies whether the database is a logical database. |
false |
| UserNickName |
string |
The nickname of the user. |
user_nick_name |
| InstanceId |
string |
The instance ID. |
1443 |
| PermDetails |
object |
||
| PermDetail |
array<object> |
The details of the user permissions. |
|
|
object |
|||
| OriginFrom |
string |
The description of the permission application source. |
xxx grant |
| PermType |
string |
The permission type. Valid values:
|
QUERY |
| ExpireDate |
string |
The expiration time of the permission. |
2020-12-12 00:00:00 |
| CreateDate |
string |
The creation time of the permission. |
2019-12-12 00:00:00 |
| UserAccessId |
string |
The ID of the permission record. |
13434 |
| ExtraData |
string |
The additional information. This is a reserved property. |
DEFAULT |
| EnvType |
string |
The environment to which the database belongs. |
product |
| ColumnName |
string |
The column name. |
column_name |
| DbType |
string |
The database type. |
mysql |
| DsType |
string |
The resource permission type. |
DATABASE |
| TableId |
string |
The table ID. |
42345 |
| SearchName |
string |
The search name of the database. |
xxx |
| Alias |
string |
The alias of the instance. |
instance_alias |
| Success |
boolean |
Indicates whether the request is successful. |
true |
Examples
Success response
JSON format
{
"TotalCount": 1,
"RequestId": "68075D06-7406-4887-83A7-F558A4D28C13",
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"UserPermissions": {
"UserPermission": [
{
"DbId": "1234",
"TableName": "table_name",
"UserId": "14324",
"SchemaName": "xxx@xxxx:3306",
"Logic": false,
"UserNickName": "user_nick_name",
"InstanceId": "1443",
"PermDetails": {
"PermDetail": [
{
"OriginFrom": "xxx grant",
"PermType": "QUERY",
"ExpireDate": "2020-12-12 00:00:00",
"CreateDate": "2019-12-12 00:00:00",
"UserAccessId": "13434",
"ExtraData": "DEFAULT"
}
]
},
"EnvType": "product",
"ColumnName": "column_name",
"DbType": "mysql",
"DsType": "DATABASE",
"TableId": "42345",
"SearchName": "xxx",
"Alias": "instance_alias"
}
]
},
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.