View the database list

Last Updated: Dec 19, 2017

Description

Retrieve the database list information for the specified instances and databases. If the search parameter type is incorrect, an error prompt is returned and the returned data is blank.

Note: This interface does not support PostgreSQL or PPAS.

Request parameters

Name Type Required? Description
Action String Yes Required parameter. Value: DescribeDatabases.
DBInstanceId String Yes Instance ID.
DBName String No Name of a database.
DBStatus String No Status of a database. Values: Creating, Running, and Deleting.

Return parameters

Name Type Description
<Public Return Parameters> - For more information, see Public parameters.
Databases List<Database> Data composed of the databases.

DATABASE parameters

Name Type Description
DBName String Name of a database.
DBInstanceId String ID of the instance to which the database belongs.
Engine String Database instance type.
DBStatus String Status of a database. Values: Creating, Running, and Deleting.
CharacterSetName String Character set.
DBDescription String Database description.
Accounts List<AccountPrivilegeInfo> List composed of the accounts.
Account String Name of an account.
AccountPrivilege String Permissions of the account on the database.

AccountPrivilegeInfo parameters

Name Type Description
Account String Name of an account.
AccountPrivilege String Permissions of the account on the database.

Example

  • Request example

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

    XML format:

    1. < DescribeDatabasesResponse>
    2. <RequestId>2603CA96-B17D-4903-BC04-61A2C829CD94</RequestId>
    3. <Databases>
    4. <Database>
    5. <Engine>MySQL</Engine>
    6. <DBName>testdb</DBName>
    7. <CharacterSetName>utf8</CharacterSetName>
    8. <DBStatus>Creating</DBStatus>
    9. <DBInstanceId>rds3meynazqbzju</DBInstanceId>
    10. <Accounts>
    11. <AccountPrivilegeInfo></AccountPrivilegeInfo>
    12. <Accounts>
    13. </Database>
    14. <Database>
    15. <Engine>MySQL</Engine>
    16. <DBName>testdb2</DBName>
    17. <CharacterSetName>gbk</CharacterSetName>
    18. <DBStatus>Creating</DBStatus>
    19. <DBInstanceId>rds3meynazqbzju</DBInstanceId>
    20. <Accounts>
    21. <AccountPrivilegeInfo></AccountPrivilegeInfo>
    22. <Accounts>
    23. </Database>
    24. </Databases>
    25. </ DescribeDatabasesResponse>

    JSON format:

    1. {
    2. "RequestId": "2603CA96-B17D-4903-BC04-61A2C829CD94",
    3. "Databases": {
    4. "Database": [
    5. {
    6. "Engine": "MySQL",
    7. "CharacterSetName": "utf8",
    8. "DBStatus": "Creating",
    9. "DBDescription": "",
    10. "DBInstanceId": "rds3meynazqbzju",
    11. "Accounts": {
    12. " AccountPrivilegeInfo": []
    13. },
    14. "DBName": "testdb"
    15. },
    16. {
    17. "Engine": "MySQL",
    18. "CharacterSetName": "gbk",
    19. "DBStatus": "Creating",
    20. "DBDescription": "",
    21. "DBInstanceId": "rds3meynazqbzju",
    22. "Accounts": {
    23. " AccountPrivilegeInfo": []
    24. },
    25. "DBName": "testdb2"
    26. }
    27. ]
    28. }
    29. }
Thank you! We've received your feedback.