Query horizontally sharded databases in a DRDS instance

Debugging

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 DescribeDrdsShardingDbs

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

DbName String Yes drds_test

The DBName of a DRDS instance.

DrdsInstanceId String Yes drdshbgaf3******

The ID of the DRDS instance.

AccessKeyId String No test

AccessKey ID.

DbNamePattern String No test

DbName matches the format.

Response parameters

Prameter Type Sample response Description
RequestId String 509BDE17-505A-4B3B-854D-30D3F0******

The ID of the request.

ShardingDbs

The list of partitioned databases.

ShardingDb

The details about a partitioned database.

BlockingTimeout Integer 5,000

The duration that a transaction must wait to obtain a lock.

ConnectUrl String 100.100.xxx.xxx:11569

The connection url.

ConnectionProperties String connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8

The properties of the connection string.

DbInstanceId String rm-bp1hjzn0yv5******

The ID of the storage instance for the DRDS database, namely, an ApsaraDB for RDS (RDS) instance.

DbStatus String running

The status of the database.

DbType String mysql

The type of the storage instance of the DRDS database.

GroupName String TEMP1_1568171495522SABE_KUP4_0000

The name of the physical table shard.

IdleTimeOut Integer 30

The idle connection timeout period.

MaxPoolSize Integer 60

The maximum size of the connection pool.

MinPoolSize Integer 5

The minimum size of the connection pool.

PreparedStatementCacheSize Integer 0

The size of the result cache.

ShardingDbName String temp1_zhk1_0000

The name of the physical database shard.

UserName String pg******

The username used to connect to the RDS instance.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample request


http(s)://[Endpoint]/? Action=DescribeDrdsShardingDbs
&DbName=drds_test
&DrdsInstanceId=drdshbgaf3******
& <Common request parameters>

Sample success responses

XML format

<DescribeDrdsShardingDbsResponse>
      <RequestId>509BDE17-505A-4B3B-854D-30D3F0******</RequestId>
      <ShardingDbs>
            <ShardingDb>
                  <ShardingDbName>temp1_zhk1_0000</ShardingDbName>
                  <GroupName>TEMP1_1568171495522SABE_KUP4_0000</GroupName>
                  <MinPoolSize>5</MinPoolSize>
                  <IdleTimeOut>30</IdleTimeOut>
                  <DbStatus>RW</DbStatus>
                  <MaxPoolSize>60</MaxPoolSize>
                  <UserName>pg******</UserName>
                  <ConnectUrl>100.100.xxx.xxx:11569</ConnectUrl>
                  <DbType>mysql</DbType>
                  <DbInstanceId>rm-bp1hjzn0yv5******</DbInstanceId>
                  <BlockingTimeout>5000</BlockingTimeout>
                  <PreparedStatementCacheSize>0</PreparedStatementCacheSize>
                  <ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
            </ShardingDb>
            <ShardingDb>
                  <ShardingDbName>temp1_zhk1_0001</ShardingDbName>
                  <GroupName>TEMP1_1568171495522SABE_KUP4_0001</GroupName>
                  <MinPoolSize>5</MinPoolSize>
                  <IdleTimeOut>30</IdleTimeOut>
                  <DbStatus>RW</DbStatus>
                  <MaxPoolSize>60</MaxPoolSize>
                  <UserName>pg******</UserName>
                  <ConnectUrl>100.100.xxx.xxx:11569</ConnectUrl>
                  <DbType>mysql</DbType>
                  <DbInstanceId>rm-bp1hjzn0yv5******</DbInstanceId>
                  <BlockingTimeout>5000</BlockingTimeout>
                  <PreparedStatementCacheSize>0</PreparedStatementCacheSize>
                  <ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
            </ShardingDb>
            <ShardingDb>
                  <ShardingDbName>temp1_zhk1_0002</ShardingDbName>
                  <GroupName>TEMP1_1568171495522SABE_KUP4_0002</GroupName>
                  <MinPoolSize>5</MinPoolSize>
                  <IdleTimeOut>30</IdleTimeOut>
                  <DbStatus>RW</DbStatus>
                  <MaxPoolSize>60</MaxPoolSize>
                  <UserName>pg******</UserName>
                  <ConnectUrl>100.100.xxx.xxx:11569</ConnectUrl>
                  <DbType>mysql</DbType>
                  <DbInstanceId>rm-bp1hjzn0yv5******</DbInstanceId>
                  <BlockingTimeout>5000</BlockingTimeout>
                  <PreparedStatementCacheSize>0</PreparedStatementCacheSize>
                  <ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
            </ShardingDb>
            <ShardingDb>
                  <ShardingDbName>temp1_zhk1_0003</ShardingDbName>
                  <GroupName>TEMP1_1568171495522SABE_KUP4_0003</GroupName>
                  <MinPoolSize>5</MinPoolSize>
                  <IdleTimeOut>30</IdleTimeOut>
                  <DbStatus>RW</DbStatus>
                  <MaxPoolSize>60</MaxPoolSize>
                  <UserName>pg******</UserName>
                  <ConnectUrl>100.100.xxx.xxx:11569</ConnectUrl>
                  <DbType>mysql</DbType>
                  <DbInstanceId>rm-bp1hjzn0yv5******</DbInstanceId>
                  <BlockingTimeout>5000</BlockingTimeout>
                  <PreparedStatementCacheSize>0</PreparedStatementCacheSize>
                  <ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
            </ShardingDb>
            <ShardingDb>
                  <ShardingDbName>temp1_zhk1_0004</ShardingDbName>
                  <GroupName>TEMP1_1568171495522SABE_KUP4_0004</GroupName>
                  <MinPoolSize>5</MinPoolSize>
                  <IdleTimeOut>30</IdleTimeOut>
                  <DbStatus>RW</DbStatus>
                  <MaxPoolSize>60</MaxPoolSize>
                  <UserName>pg******</UserName>
                  <ConnectUrl>100.100.xxx.xxx:11569</ConnectUrl>
                  <DbType>mysql</DbType>
                  <DbInstanceId>rm-bp1hjzn0yv5******</DbInstanceId>
                  <BlockingTimeout>5000</BlockingTimeout>
                  <PreparedStatementCacheSize>0</PreparedStatementCacheSize>
                  <ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
            </ShardingDb>
            <ShardingDb>
                  <ShardingDbName>temp1_zhk1_0005</ShardingDbName>
                  <GroupName>TEMP1_1568171495522SABE_KUP4_0005</GroupName>
                  <MinPoolSize>5</MinPoolSize>
                  <IdleTimeOut>30</IdleTimeOut>
                  <DbStatus>RW</DbStatus>
                  <MaxPoolSize>60</MaxPoolSize>
                  <UserName>pg******</UserName>
                  <ConnectUrl>100.100.xxx.xxx:11569</ConnectUrl>
                  <DbType>mysql</DbType>
                  <DbInstanceId>rm-bp1hjzn0yv5******</DbInstanceId>
                  <BlockingTimeout>5000</BlockingTimeout>
                  <PreparedStatementCacheSize>0</PreparedStatementCacheSize>
                  <ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
            </ShardingDb>
            <ShardingDb>
                  <ShardingDbName>temp1_zhk1_0006</ShardingDbName>
                  <GroupName>TEMP1_1568171495522SABE_KUP4_0006</GroupName>
                  <MinPoolSize>5</MinPoolSize>
                  <IdleTimeOut>30</IdleTimeOut>
                  <DbStatus>RW</DbStatus>
                  <MaxPoolSize>60</MaxPoolSize>
                  <UserName>pg******</UserName>
                  <ConnectUrl>100.100.xxx.xxx:11569</ConnectUrl>
                  <DbType>mysql</DbType>
                  <DbInstanceId>rm-bp1hjzn0yv5******</DbInstanceId>
                  <BlockingTimeout>5000</BlockingTimeout>
                  <PreparedStatementCacheSize>0</PreparedStatementCacheSize>
                  <ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
            </ShardingDb>
            <ShardingDb>
                  <ShardingDbName>temp1_zhk1_0007</ShardingDbName>
                  <GroupName>TEMP1_1568171495522SABE_KUP4_0007</GroupName>
                  <MinPoolSize>5</MinPoolSize>
                  <IdleTimeOut>30</IdleTimeOut>
                  <DbStatus>RW</DbStatus>
                  <MaxPoolSize>60</MaxPoolSize>
                  <UserName>pg******</UserName>
                  <ConnectUrl>100.100.xxx.xxx:11569</ConnectUrl>
                  <DbType>mysql</DbType>
                  <DbInstanceId>rm-bp1hjzn0yv5******</DbInstanceId>
                  <BlockingTimeout>5000</BlockingTimeout>
                  <PreparedStatementCacheSize>0</PreparedStatementCacheSize>
                  <ConnectionProperties>connectTimeout=3000;autoReconnect=true;failOverReadOnly=false;socketTimeout=900000;rewriteBatchedStatements=true;characterEncoding=utf8</ConnectionProperties>
            </ShardingDb>
      </ShardingDbs>
      <Success>true</Success>
</DescribeDrdsShardingDbsResponse>

Error codes

HTTP status code 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 action. Perform RAM authorization first.

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