Call ListDatabaseUserPermssions to display permission details of users who have the specified database permission.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListDatabaseUserPermssions |
The operation that you want to perform. Set the value to ListDatabaseUserPermssions . |
DbId | String | Yes | 123 |
The ID of the database. |
PermType | String | Yes | DATABASE |
The permission type. The values and descriptions are as follows:
|
Tid | Long | Yes | -1 |
The ID of the tenant. Note The tenant ID is taken from the avatar in the upper-right corner of the system. For
more information, see Tenant ID and Tenant .
|
Logic | Boolean | No | false |
Specifies whether the database is a logical database. |
UserName | String | No | search_user_name |
The nickname of the user. |
PageNumber | Integer | No | 1 |
The page number of the returned page. |
PageSize | Integer | No | 10 |
The amount of data per page. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ErrorCode | String | UnknownError |
The error code. |
ErrorMessage | String | UnknownError |
The error message of the failure. |
RequestId | String | 68075D06-7406-4887-83A7-F558A4D28C13 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. |
TotalCount | Long | 1 |
The total number of records that meet the specified conditions. |
UserPermissions | Array of UserPermission |
The details about user permissions. |
|
UserPermission | |||
Alias | String | instance_alias |
The alias of the instance. |
ColumnName | String | column_name |
The name of the column. |
DbId | String | 1234 |
The ID of the database. |
DbType | String | mysql |
The type of the storage instance of the DRDS database. |
DsType | String | DATABASE |
The type of the resource permission. |
EnvType | String | product |
The environment to which the database belongs. |
InstanceId | String | 1443 |
The ID of the instance. |
Logic | Boolean | false |
Specifies whether the database is a logical database. |
PermDetails | Array of PermDetail |
The details about user permissions. |
|
PermDetail | |||
CreateDate | String | 2019-12-12 00:00:00 |
The time when the permission was created. |
ExpireDate | String | 2020-12-12 00:00:00 |
Permission expiration time |
ExtraData | String | DEFAULT |
Additional information, reserved attributes |
OriginFrom | String | xxx grant |
Permission application source description |
PermType | String | QUERY |
The permission type. The values and descriptions are as follows:
|
UserAccessId | String | 13434 |
Permission record ID |
SchemaName | String | xxx@xxxx:3306 |
The name of the database. |
SearchName | String | xxx |
The name of the database search. |
TableId | String | 42345 |
The ID of the table. |
TableName | String | table_name |
The name of the table. |
UserId | String | 14324 |
The ID of the user. |
UserNickName | String | user_nick_name |
The nickname of the user. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ListDatabaseUserPermssions &DbId=123&perftype=DATABASE &Tid=-1 &<common request parameters>
Sample success responses
XML
format
<UserPermissions> <UserPermission> <Logic>false</Logic> <UserNickName>xxx</UserNickName> <DsType>DATABASE</DsType> <Alias>beihe_ent_prod</Alias> <PermDetails> <PermDetail> <ExpireDate>2020-10-31 00:00:00</ExpireDate> <UserAccessId>390915</UserAccessId> <PermType>QUERY</PermType> <OriginFrom>xxx</OriginFrom> <CreateDate>2019-11-21 15:07:45</CreateDate> </PermDetail> <PermDetail> <ExpireDate>2020-10-31 00:00:00</ExpireDate> <UserAccessId>390916</UserAccessId> <PermType>EXPORT</PermType> <OriginFrom>xxx</OriginFrom> <CreateDate>2019-11-21 15:07:45</CreateDate> </PermDetail> <PermDetail> <ExpireDate>2020-10-31 00:00:00</ExpireDate> <UserAccessId>390917</UserAccessId> <PermType>CORRECT</PermType> <OriginFrom>xxx</OriginFrom> <CreateDate>2019-11-21 15:07:45</CreateDate> </PermDetail> </PermDetails> <InstanceId>1434</InstanceId> <SearchName>xxx@xxxx:3306</SearchName> <DbId>123434</DbId> <UserId>432423</UserId> <DbType>drds</DbType> <EnvType>product</EnvType> <SchemaName>xxx</SchemaName> </UserPermission> </UserPermissions> <TotalCount>1</TotalCount> <RequestId>68075D06-7406-4887-83A7-F558A4D28C13</RequestId> <Success>true</Success>
JSON
Format
{ "UserPermissions": { "UserPermission": [ { "Logic": false, "UserNickName": "xxx", "DsType": "DATABASE", "Alias": "beihe_ent_prod", "PermDetails": { "PermDetail": [ { "ExpireDate": "2020-10-31 00:00:00", "UserAccessId": "390915", "PermType": "QUERY", "OriginFrom": "xxx", "CreateDate": "2019-11-21 15:07:45" }, { "ExpireDate": "2020-10-31 00:00:00", "UserAccessId": "390916", "PermType": "EXPORT", "OriginFrom": "xxx", "CreateDate": "2019-11-21 15:07:45" }, { "ExpireDate": "2020-10-31 00:00:00", "UserAccessId": "390917", "PermType": "CORRECT", "OriginFrom": "xxx", "CreateDate": "2019-11-21 15:07:45" } ] }, "InstanceId": 1434, "SearchName": "xxx@xxxx:3306", "DbId": 123434, "UserId": 432423, "DbType": "drds", "EnvType": "product", "SchemaName": "xxx" } ] }, "TotalCount": 1, "RequestId": "68075D06-7406-4887-83A7-F558A4D28C13", "Success": true }
Error codes
Go to the Error Center For more information, see error codes.