Description

Retrieve account list information for the specified instance and the specified database or the information of the specified account.

Request parameters

Name Type Required Description
Action String Yes Required parameter. Value: DescribeAccounts.
DBInstanceId String Yes Instance ID.
AccountName String No Name of an account.

Return parameters

Name Type Description
<Public Return Parameters> For more information, see Public parameters.
Accounts List<DBInstanceAccount> Array composed of the accounts.

DBInstanceAccount parameters

Name Type Description
DBInstanceId String ID of the instance to which the account belongs.
AccountName String Name of the database operation account.
AccountStatus String Account status. Values:
  • Unavailable
  • Available
AccountDescription String Account remarks.
DatabasePrivileges List<DatabasePrivilege> Array composed of DatabasePrivileges.
AccountType String Type of account.
  • Normal: Common privilege.
  • Super: High privilege.

DatabasePrivilege parameters

Name Type Description
DBName String Name of a database.
AccountPrivilege String Name of the database account.

Request example

https://rds.aliyuncs.com/?Action=DescribeAccounts
&DBInstanceId=rdsubauieubauie
&<Public Request Parameters>

Response example

XML format

<DescribeAccountsResponse>
         <RequestId>2603CA96-B17D-4903-BC04-61A2C829CD94</RequestId>
           <Accounts>
               <DBInstanceAccount>
                  <AccountName>MySQL</AccountName>
                  <DBInstanceId>testdb</DBInstanceId>
                  <AccountStatus>utf8</AccountStatus>
                  <AccountDescription></AccountDescription>
                  <DatabasePrivileges>
      <DatabasePrivilege></DatabasePrivilege>
</DatabasePrivileges>
               <DBInstanceAccount>
           </Accounts>
</DescribeAccountsResponse>

JSON format

{
    "Accounts": {
      "DBInstanceAccount": [
        {
          "AccountDescription": "", 
          "DBInstanceId": "rdsubauieubauie", 
          "DatabasePrivileges": {
            "DatabasePrivilege": []
          }, 
          "AccountStatus": "Unavailable", 
          "AccountName": "testaccount"
        }
      ]
    }, 
    "RequestId": "8D9A9689-F108-43B4-9D2E-0A52FF42B008"
  }