Grant account permissions

Last Updated: Apr 11, 2018


Grant database access permissions to accounts. A single account can be associated with one or more databases.

If the specified account already has the access permission on the specified database, the operation directly returns a successful result.

Instance status must be Running.

Request parameters

Name Type Required? Description
Action String Yes Required parameter. Value: GrantAccountPrivilege.
DBInstanceId String Yes Instance ID.
AccountName String Yes Name of an account.
DBName String Yes Name of the database associated with this account.
AccountPrivilege String Yes Account permission. Values: ReadOnly and ReadWrite.

Return parameters

Name Type Description
<Public Return Parameters> - For more information, see Public parameters.


  • Request example

    2. &AccountName=testacc02
    3. &AccountPrivilege=ReadWrite
    4. &DBName=testdb03
    5. &DBInstanceId=riauvjz6zajfiq6ba1370329449201
    6. &<Public Request Parameters>
  • Return example

    XML format:

    1. <GrantAccountPrivilegeResponse>
    2. <RequestId>81BC9559-7B22-4B7F-B705-5F56DEECDEA7</RequestId>
    3. </GrantAccountPrivilegeResponse>

    JSON format:

    1. {
    2. "RequestId":"81BC9559-7B22-4B7F-B705-5F56DEECDEA7"
    3. }
Thank you! We've received your feedback.