Queries horizontally sharded databases under a PolarDB-X instance by calling the DescribeDrdsShardingDbs operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
drds:DescribeDrdsShardingDbs |
get |
*instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DrdsInstanceId |
string |
Yes |
The instance ID of the PolarDB-X instance. |
drdshbgaf3c63qbo |
| DbName |
string |
Yes |
The name of the database on the PolarDB-X instance. |
drds_test |
| DbNamePattern |
string |
No |
The database name matching pattern. |
test |
| PageNumber |
integer |
No |
The current page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
20 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Success |
boolean |
Indicates whether the request was successful. |
true |
| RequestId |
string |
The request ID. |
509BDE17-505A-4B3B-854D-30D3F092502F |
| ShardingDbs |
object |
||
| ShardingDb |
array<object> |
The list of returned results. |
|
|
object |
|||
| MinPoolSize |
integer |
The minimum size of the connection pool. |
5 |
| MaxPoolSize |
integer |
The maximum size of the connection pool. |
60 |
| DbInstanceId |
string |
The ID of the Apsara RDS for MySQL instance that is used as the storage of the database shard. |
rm-bp1hjzn0yv5j2**** |
| ConnectUrl |
string |
The URL that is used to access the Apsara RDS for MySQL instance. |
100.100.64.100:11569 |
| GroupName |
string |
The name of group on which the database shard is stored. |
TEMP1_1568171495522SABE_KUP4_0000 |
| DbType |
string |
The engine of the database. |
mysql |
| IdleTimeOut |
integer |
The timeout period of an idle connection. |
30 |
| ShardingDbName |
string |
The name of the database shard. |
temp1_zhk1_0000 |
| BlockingTimeout |
integer |
The timeout period for a transaction to wait for the release of the data lock. |
5000 |
| PreparedStatementCacheSize |
integer |
The size of cache for the returned results. |
0 |
| ConnectionProperties |
string |
The properties of the connection string. |
connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8 |
| UserName |
string |
The username that is used to connect to the ApsaraDB RDS for MySQL instance. |
pg284mi8 |
| DbStatus |
string |
The status of the database. |
running |
| PageNumber |
string |
The current page number. |
1 |
| PageSize |
string |
The number of entries per page. |
20 |
| Total |
string |
The total number of entries returned. |
1 |
Examples
Success response
JSON format
{
"Success": true,
"RequestId": "509BDE17-505A-4B3B-854D-30D3F092502F",
"ShardingDbs": {
"ShardingDb": [
{
"MinPoolSize": 5,
"MaxPoolSize": 60,
"DbInstanceId": "rm-bp1hjzn0yv5j2****",
"ConnectUrl": "100.100.64.100:11569",
"GroupName": "TEMP1_1568171495522SABE_KUP4_0000",
"DbType": "mysql",
"IdleTimeOut": 30,
"ShardingDbName": "temp1_zhk1_0000",
"BlockingTimeout": 5000,
"PreparedStatementCacheSize": 0,
"ConnectionProperties": "connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8",
"UserName": "pg284mi8",
"DbStatus": "running"
}
]
},
"PageNumber": "1",
"PageSize": "20",
"Total": "1"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ActionUnauthorized | The specified action is not available for you | |
| 400 | ServiceUnable | The service is not available now, please try again later | |
| 400 | InvalidParameter.Mismatch | The specified parameter does not match. | |
| 400 | InvalidDbname.MalFormed | The specified db name does not match. | |
| 400 | InvalidDRDSInstanceId.NotFound | The DrdsInstanceId provided does not exist in our records | |
| 400 | InvalidDbName.NotFound | The Drds DbName provided does not exist in our records | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 404 | InvalidDRDSInstanceId.NotFound | The DrdsInstanceId provided does not exist in our records. | |
| 404 | InvalidDbName.NotFound | The Drds DbName provided does not exist in our records. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.