Queries the databases on a PolarDB-X 1.0 instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeDrdsDBs |
The operation that you want to perform. Set the value to DescribeDrdsDBs. |
| DrdsInstanceId | String | Yes | drdshbga1138**** |
The ID of the PolarDB-X 1.0 instance. |
| PageNumber | Integer | No | 1 |
The number of the page to return. The value of this parameter must be an integer that is greater than 0. Default value: 1. |
| PageSize | Integer | No | 30 |
The number of databases to return on each page. Valid values: 30, 50, and 100. Default value: 30. |
| RegionId | String | Yes | cn-hangzhou |
The ID of the region in which the PolarDB-X 1.0 instance is created. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| PageSize | String | 30 |
The number of databases returned on each page. |
| PageNumber | String | 1 |
The page number of the returned page. |
| RequestId | String | 006B7D19-8CDB-4AA6-AAE7-23C107GS3W2T |
The ID of the request. |
| Total | String | 1 |
The number of returned databases. |
| Success | Boolean | true |
Indicates whether the request is successful. |
| Data | Array of Db |
The list of returned databases. |
|
| Db | |||
| Status | String | NORMAL |
The state of the database. |
| DbName | String | drds_test |
The name of the database. |
| Schema | String | drds_test_1563773871118kxqd |
The schema ID that is assigned to the partitioned database. |
| CreateTime | String | 1563773824000 |
The time when the database is created. The value of this parameter is a UNIX timestamp. Unit: ms. |
| Mode | String | HORIZONTAL |
The partitioning mode of the database. Valid values:
|
| DbInstType | String | RDS |
The type of the database. Valid values: RDS and POLARDB. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeDrdsDBs
&DrdsInstanceId=drdshbga1138****
&PageNumber=1
&PageSize=30
&RegionId=cn-hangzhou
&<Common request parameters>Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDrdsDBsResponse>
<PageSize>30</PageSize>
<PageNumber>1</PageNumber>
<RequestId>006B7D19-8CDB-4AA6-AAE7-23C107GS3W2T</RequestId>
<Total>1</Total>
<Success>true</Success>
<Data>
<Status>NORMAL</Status>
<DbName>drds_test</DbName>
<Schema>drds_test_1563773871118kxqd</Schema>
<CreateTime>1563773824000</CreateTime>
<Mode>HORIZONTAL</Mode>
<DbInstType>RDS</DbInstType>
</Data>
</DescribeDrdsDBsResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageSize" : "30",
"PageNumber" : "1",
"RequestId" : "006B7D19-8CDB-4AA6-AAE7-23C107GS3W2T",
"Total" : "1",
"Success" : true,
"Data" : [ {
"Status" : "NORMAL",
"DbName" : "drds_test",
"Schema" : "drds_test_1563773871118kxqd",
"CreateTime" : "1563773824000",
"Mode" : "HORIZONTAL",
"DbInstType" : "RDS"
} ]
}Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | ActionUnauthorized | The specified action is not available for you | The error message returned because you are not authorized to perform this operation. Grant the required permissions to the RAM user first. |
| 500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error has occurred and the request failed. |
For a list of error codes, visit the API Error Center.