Queries information about databases in a PolarDB-X instance.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDbList

The operation that you want to perform. Set the value to DescribeDbList.

RegionId String Yes cn-hangzhou

The ID of the region where the PolarDB-X instance is deployed.

DBInstanceName String Yes pxc-********

The name of the PolarDB-X instance.

DBName String No db_name

The name of the database that you want to query.

Response parameters

Parameter Type Example Description
Message String Success

The message that is returned. If the request is successful, "success" is returned. If the request fails, an error code is returned.

RequestId String C458B1E8-1683-3645-B154-6BA32080EEA

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Data Array of DB

The list of databases.

DBName String test

The name of the database.

DBDescription String test

The description of the database.

DBInstanceName String pxc-********

The name of the PolarDB-X instance in which the database is deployed.

CharacterSetName String utf8mb4

The character set that is supported by the database.

Accounts Array of Account

The list of accounts that can be used to access the database.

AccountPrivilege String ReadWrite

The type of permissions that are granted to the account.

AccountName String root4test

The username of the account.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDbList
&RegionId=cn-hangzhou
&DBInstanceName=pxc-********
&DBName=db_name
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDbListResponse>
    <Message>Success</Message>
    <RequestId>C458B1E8-1683-3645-B154-6BA32080EEA</RequestId>
    <Success>true</Success>
    <Data>
        <DBName>test</DBName>
        <DBDescription>test</DBDescription>
        <DBInstanceName>pxc-********</DBInstanceName>
        <CharacterSetName>utf8mb4</CharacterSetName>
        <Accounts>
            <AccountPrivilege>ReadWrite</AccountPrivilege>
            <AccountName>root4test</AccountName>
        </Accounts>
    </Data>
</DescribeDbListResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Message" : "Success",
  "RequestId" : "C458B1E8-1683-3645-B154-6BA32080EEA",
  "Success" : true,
  "Data" : [ {
    "DBName" : "test",
    "DBDescription" : "test",
    "DBInstanceName" : "pxc-********",
    "CharacterSetName" : "utf8mb4",
    "Accounts" : [ {
      "AccountPrivilege" : "ReadWrite",
      "AccountName" : "root4test"
    } ]
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.