Grants permissions on an instance, a database, or a table to a user.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Tid | long | Yes | 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.
| 3*** |
UserId | string | Yes | 51**** | |
DsType | string | Yes | The permissions on a specific type of object that you want to grant to the user. Valid values:
| DATABASE |
InstanceId | long | No | The ID of the instance. You must specify this parameter if you grant permissions on an instance to the user. You can call the ListInstances or GetInstance operation to query the ID of the instance. | 174**** |
DbId | string | Yes | The ID of the database. You can call the ListDatabases operation to query the ID of a physical database and the ListLogicDatabases operation to query the ID of a logical database. Note
The value of the DatabaseId parameter is that of the DbId parameter.
| 1*** |
Logic | boolean | No | Specifies whether the database is a logical database. You must specify this parameter if you grant permissions on a database to the user. Valid values:
| false |
TableId | string | No | The ID of the table. You must specify this parameter if you grant permissions on a table to the user. You can call the ListTables operation to query the table ID. | 132*** |
TableName | string | No | The name of the table. You must specify this parameter if you grant permissions on a table to the user. | table_name |
PermTypes | string | Yes | The permission type. Separate multiple permission types with commas (,). Valid values:
| QUERY |
ExpireDate | string | Yes | The time when the permissions expire. | 2021-12-12 00:00:00 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "A99CD576-1E18-4E86-931E-C3CCE56DC030",
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"Success": true
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|