All Products
Search
Document Center

PolarDB:DescribeDrdsShardingDbs

Last Updated:Jul 10, 2026

Queries horizontally sharded databases under a PolarDB-X instance by calling the DescribeDrdsShardingDbs operation.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

drds:DescribeDrdsShardingDbs

get

*instance

acs:drds:{#regionId}:{#accountId}:instance/{#instanceId}/db/{#DbName}

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.