View the account list

Last Updated: Dec 06, 2017

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 and 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 operation account.

Example

  • Request example

    1. https://rds.aliyuncs.com/?Action=DescribeAccounts
    2. &DBInstanceId=rdsubauieubauie
    3. &<Public Request Parameters>
  • Return example

    XML format:

    1. <DescribeAccountsResponse>
    2. <RequestId>2603CA96-B17D-4903-BC04-61A2C829CD94</RequestId>
    3. <Accounts>
    4. <DBInstanceAccount>
    5. <AccountName>MySQL</AccountName>
    6. <DBInstanceId>testdb</DBInstanceId>
    7. <AccountStatus>utf8</AccountStatus>
    8. <AccountDescription></AccountDescription>
    9. <DatabasePrivileges>
    10. <DatabasePrivilege></DatabasePrivilege>
    11. </DatabasePrivileges>
    12. <DBInstanceAccount>
    13. </Accounts>
    14. </DescribeAccountsResponse>

    JSON format:

    1. {
    2. "Accounts": {
    3. "DBInstanceAccount": [
    4. {
    5. "AccountDescription": "",
    6. "DBInstanceId": "rdsubauieubauie",
    7. "DatabasePrivileges": {
    8. "DatabasePrivilege": []
    9. },
    10. "AccountStatus": "Unavailable",
    11. "AccountName": "testaccount"
    12. }
    13. ]
    14. },
    15. "RequestId": "8D9A9689-F108-43B4-9D2E-0A52FF42B008"
    16. }
Thank you! We've received your feedback.