Grant permissions to users by using a permission template.
Operation description
You must be a database administrator (DBA) or a Data Management (DMS) administrator. To view system roles, see View system roles.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:GrantTemplateAuthority |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateId |
integer |
Yes |
The ID of the permission template. |
1563 |
| UserIds |
string |
Yes |
The user IDs to grant permissions to by using the permission template. |
[12***,34***,56***] |
| ExpireDate |
string |
Yes |
The permission expiration time. Format: yyyy-MM-DD HH:mm:ss. |
2023-03-08 17:58:53 |
| Comment |
string |
No |
The reason for granting permissions to the users. |
Business testing. |
| Tid |
integer |
No |
The tenant ID. You can call the GetUserActiveTenant or ListUserTenants operation to query the tenant ID. |
3*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
34E01EDD-6A16-4CF0-9541-C644D1BE01AA |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| ErrorMessage |
string |
The error message returned if the request failed. |
UnknownError |
| ErrorCode |
string |
The error code. |
UnknownError |
| Result |
boolean |
Indicates whether the permissions were granted successfully. |
true |
Examples
Success response
JSON format
{
"RequestId": "34E01EDD-6A16-4CF0-9541-C644D1BE01AA",
"Success": true,
"ErrorMessage": "UnknownError",
"ErrorCode": "UnknownError",
"Result": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.