Queries the database shards of an PolarDB-X 1.0 instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeDrdsShardingDbs |
The operation that you want to perform. Set the value to DescribeDrdsShardingDbs. |
| DrdsInstanceId | String | Yes | drdshbgaf3c63qbo |
The ID of the PolarDB-X 1.0 instance whose database shards you want to query. |
| DbName | String | Yes | drds_test |
The name of the database whose shards you want to query. |
| DbNamePattern | String | No | test |
The matching pattern of the database name. |
| PageNumber | Long | No | 1 |
The page number of the returned page. |
| PageSize | Long | No | 20 |
The number of database shards returned on each page. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Success | Boolean | true |
Indicates whether the request is successful. |
| RequestId | String | 509BDE17-505A-4B3B-854D-30D3F092502F |
The ID of the request. |
| ShardingDbs | Array of ShardingDb |
The list of returned database shards. |
|
| ShardingDb | |||
| MinPoolSize | Integer | 5 |
The minimum size of the connection pool. |
| MaxPoolSize | Integer | 60 |
The maximum size of the connection pool. |
| DbInstanceId | String | rm-bp1hjzn0yv5j2**** |
The ID of the Apsara RDS for MySQL instance that is used as the storage of the database shard. |
| ConnectUrl | String | 100.100.64.100:11569 |
The URL that is used to access the Apsara RDS for MySQL instance. |
| GroupName | String | TEMP1_1568171495522SABE_KUP4_0000 |
The name of group on which the database shard is stored. |
| DbType | String | mysql |
The engine of the database. |
| IdleTimeOut | Integer | 30 |
The timeout period of an idle connection. |
| ShardingDbName | String | temp1_zhk1_0000 |
The name of the database shard. |
| BlockingTimeout | Integer | 5000 |
The timeout period for a transaction to wait for the release of the data lock. |
| PreparedStatementCacheSize | Integer | 0 |
The size of cache for the returned results. |
| ConnectionProperties | String | connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8 |
The properties of the connection string. |
| UserName | String | pg284mi8 |
The username that is used to connect to the ApsaraDB RDS for MySQL instance. |
| DbStatus | String | running |
The status of the database. |
| PageNumber | String | 1 |
The page number of the returned page. |
| PageSize | String | 20 |
The number of database shards returned per page. |
| Total | String | 1 |
The number of returned database shards. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeDrdsShardingDbs
&DrdsInstanceId=drdshbgaf3c63qbo
&DbName=drds_test
&DbNamePattern=test
&PageNumber=1
&PageSize=20
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDrdsShardingDbsResponse>
<Success>true</Success>
<RequestId>509BDE17-505A-4B3B-854D-30D3F092502F</RequestId>
<ShardingDbs>
<MinPoolSize>5</MinPoolSize>
<MaxPoolSize>60</MaxPoolSize>
<DbInstanceId>rm-bp1hjzn0yv5j2****</DbInstanceId>
<ConnectUrl>100.100.64.100:11569</ConnectUrl>
<GroupName>TEMP1_1568171495522SABE_KUP4_0000</GroupName>
<DbType>mysql</DbType>
<IdleTimeOut>30</IdleTimeOut>
<ShardingDbName>temp1_zhk1_0000</ShardingDbName>
<BlockingTimeout>5000</BlockingTimeout>
<PreparedStatementCacheSize>0</PreparedStatementCacheSize>
<ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
<UserName>pg284mi8</UserName>
<DbStatus>running</DbStatus>
</ShardingDbs>
<PageNumber>1</PageNumber>
<PageSize>20</PageSize>
<Total>1</Total>
</DescribeDrdsShardingDbsResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Success" : true,
"RequestId" : "509BDE17-505A-4B3B-854D-30D3F092502F",
"ShardingDbs" : [ {
"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
| 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.