Modifies the permissions that are granted to an account.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyAccountPrivilege |
The operation that you want to perform. Set the value to ModifyAccountPrivilege. |
DrdsInstanceId | String | Yes | drdshbgaen89**** |
The ID of the PolarDB-X 1.0 instance. |
AccountName | String | Yes | account_sec |
The username of the account that you want to modify. |
RegionId | String | No | cn-hangzhou |
The ID of the region in which the PolarDB-X 1.0 instance is located. |
DbPrivilege.N.DbName | String | No | test123 |
The name of the database that you want to manage by using the account to modify. |
DbPrivilege.N.Privilege | String | No | ReadWrite |
The permissions that you want to grant to the account. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Success | Boolean | true |
Indicates whether the request is successful. |
RequestId | String | 73559800-3c8c-11ec-bd40-99cfcff3fe1e |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyAccountPrivilege
&DrdsInstanceId=drdshbgaen89****
&AccountName=account_sec
&RegionId=cn-hangzhou
&DbPrivilege=[{"DbName":"test123","Privilege":"ReadWrite"}]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyAccountPrivilegeResponse>
<Success>true</Success>
<RequestId>73559800-3c8c-11ec-bd40-99cfcff3fe1e</RequestId>
</ModifyAccountPrivilegeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Success" : true,
"RequestId" : "73559800-3c8c-11ec-bd40-99cfcff3fe1e"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error has occurred and the request failed. |
For a list of error codes, visit the API Error Center.