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
  • ReadWrite

Return parameters

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

Request example
&<Public Request Parameters>

Response example

XML format


JSON format