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.

Notice
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
  • Deleting

Return parameters

Name Type Description
<Public return parameter> 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
  • 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.

Request example

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

Response example

XML format:

< DescribeDatabasesResponse>
         <RequestId>2603CA96-B17D-4903-BC04-61A2C829CD94</RequestId>
           <Databases>
               <Database>
                  <Engine>MySQL</Engine>
                  <DBName>testdb</DBName>
                  <CharacterSetName>utf8</CharacterSetName>
                  <DBStatus>Creating</DBStatus>
                  <DBInstanceId>rds3meynazqbzju</DBInstanceId>
                  <Accounts>
                         <AccountPrivilegeInfo></AccountPrivilegeInfo>
                  <Accounts>  
               </Database>
               <Database>
                  <Engine>MySQL</Engine>
                  <DBName>testdb2</DBName>
                  <CharacterSetName>gbk</CharacterSetName>
                  <DBStatus>Creating</DBStatus>
                  <DBInstanceId>rds3meynazqbzju</DBInstanceId>
                  <Accounts>
                         <AccountPrivilegeInfo></AccountPrivilegeInfo>
                  <Accounts>  
               </Database>
          </Databases>
</ DescribeDatabasesResponse>

JSON format:

 {
    "RequestId": "2603CA96-B17D-4903-BC04-61A2C829CD94", 
    "Databases": {
      "Database": [
        {
          "Engine": "MySQL", 
          "CharacterSetName": "utf8", 
          "DBStatus": "Creating", 
          "DBDescription": "", 
          "DBInstanceId": "rds3meynazqbzju", 
          "Accounts": {
            " AccountPrivilegeInfo": []
          }, 
          "DBName": "testdb"
        }, 
        {
          "Engine": "MySQL", 
          "CharacterSetName": "gbk", 
          "DBStatus": "Creating", 
          "DBDescription": "", 
          "DBInstanceId": "rds3meynazqbzju", 
          "Accounts": {
            " AccountPrivilegeInfo": []
          }, 
          "DBName": "testdb2"
        }
      ]
    }
  }