All Products
Search
Document Center

PolarDB:DescribeDrdsDbInstances

Last Updated:Jul 10, 2026

Queries the list of ApsaraDB RDS instances associated with a DRDS database.

Operation description

Queries the list of primary ApsaraDB RDS instances associated with a DRDS database. The ReadOnlyInstances property of each primary RDS instance contains the list of read-only instances used by the current database.

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:DescribeDrdsDbInstances

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.

drdshbga1138****

DbName

string

Yes

The database name.

dbname

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page.

30

Response elements

Element

Type

Description

Example

object

PageSize

string

The page size.

10

PageNumber

string

The page number.

1

RequestId

string

The request ID.

2F7F8080-9132-4279-85D0-B7E5C4305162

Total

string

The total number of primary RDS instances.

1

Success

boolean

Indicates whether the request was successful.

true

DbInstances

object

DbInstance

array<object>

The list of storage instances associated with the database.

array<object>

ExpireTime

string

Indicates the point in time when the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database expires.

1237486127634

PayType

string

Indicates the billing method of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database. Valid values:

  • drdsPre: The instance uses the subscription billing method.

  • drdsPost: The instance uses the pay-as-you-go billing method.

PostPaid

DBInstanceStatus

string

Indicates the state of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database. Valid values:

  • 0: The ApsaraDB RDS for MySQL instance is being created.

  • 1: The ApsaraDB RDS for MySQL instance is running.

  • 3: The ApsaraDB RDS for MySQL instance is being deleted.

  • 5: The ApsaraDB RDS for MySQL instance is being restarted.

  • 6: The ApsaraDB RDS for MySQL instance is being upgraded or downgraded.

  • 7: The ApsaraDB RDS for MySQL instance is being backed up.

  • 8: The network type of the ApsaraDB RDS for MySQL instance is being changed.

  • 9: The ApsaraDB RDS for MySQL instance is being migrated.

  • 11: The data of the ApsaraDB RDS for MySQL instance is being migrated.

  • 12: A disaster-recovery instance is being generated.

  • 13: Data is being imported to the ApsaraDB RDS for MySQL instance.

  • 14: Data is being imported to the ApsaraDB RDS for MySQL instance from an another ApsaraDB RDS for MySQL instance.

  • 15: A failover is being performed.

  • 16: A temporary instance is being created.

  • 17: A network is being created for the ApsaraDB RDS for MySQL instance.

  • 18: The ApsaraDB RDS for MySQL instance is being cloned.

  • 19: The link is being changed.

  • 20: The read-only instances of the ApsaraDB RDS for MySQL instance are being migrated.

1

NetworkType

string

Indicates the network type of the ApsaraDB RDS for MySQL instance.

VPC

Port

integer

Indicates the port that is used to connect to the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

3306

EngineVersion

string

Indicates the engine version of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

5.7

DmInstanceId

string

Indicates the ID of a resource.

dm-hbgau1zp****

ConnectUrl

string

Indicates the endpoint that is used to connect to an ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

rm-bp1t1mk5a5b******.mysql.rds.aliyuncs.com

ReadWeight

integer

Indicates the read weight of the read-only instance.

30

RdsInstType

string

Indicates whether the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database is a primary instance or a read-only instance.

  • Primary: The instance is a primary instance.

  • Readonly: The instance is a read-only instance.

Primary

RemainDays

integer

Indicates the number of remaining days before a subscription instance expires.

0

DBInstanceId

string

Indicates the ID of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

rm-bp1t1mk5a5bdj****

DbInstType

string

Indicates the type of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database. The value is set to RDS.

RDS

Engine

string

Indicates the engine of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

MySQL

ReadOnlyInstances

object

ReadOnlyInstance

array<object>

Indicates information about the read-only instances of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

object

ExpireTime

string

Indicates the timestamp when the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database expires.

123421352351234

PayType

string

Indicates the billing method of the read-only instance.

  • drdsPre: The instance uses the subscription billing method.

  • drdsPost: The instance uses the pay-as-you-go billing method.

Postpaid

DBInstanceStatus

string

Indicates the state of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database. Valid values:

  • 0: The ApsaraDB RDS for MySQL instance is being created.

  • 1: The ApsaraDB RDS for MySQL instance is running.

  • 3: The ApsaraDB RDS for MySQL instance is being deleted.

  • 5: The ApsaraDB RDS for MySQL instance is being restarted.

  • 6: The ApsaraDB RDS for MySQL instance is being upgraded or downgraded.

  • 7: The ApsaraDB RDS for MySQL instance is being backed up.

  • 8: The network type of the ApsaraDB RDS for MySQL instance is being changed.

  • 9: The ApsaraDB RDS for MySQL instance is being migrated.

  • 11: The data of the ApsaraDB RDS for MySQL instance is being migrated.

  • 12: A disaster-recovery instance is being generated.

  • 13: Data is being imported to the ApsaraDB RDS for MySQL instance.

  • 14: Data is being imported to the ApsaraDB RDS for MySQL instance from an another ApsaraDB RDS for MySQL instance.

  • 15: A failover is being performed.

  • 16: A temporary instance is being created.

  • 17: A network is being created for the ApsaraDB RDS for MySQL instance.

  • 18: The ApsaraDB RDS for MySQL instance is being cloned.

  • 19: The link is being changed.

  • 20: The read-only instances of the ApsaraDB RDS for MySQL instance are being migrated.

1

NetworkType

string

Indicates the network type of the read-only instance.

VPC

Port

integer

Indicates the port that is used to connect to the read-only instance.

3306

EngineVersion

string

Indicates the engine version of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

5.7

DmInstanceId

string

Indicates the ID of a resource.

dm-hbgau1zp****

ConnectUrl

string

Indicates the endpoint that is used to connect to the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

rm-bp1t1mk5a5b******.mysql.rds.aliyuncs.com

ReadWeight

integer

Indicates the read weight of the read-only instance.

70

RdsInstType

string

Indicates the type of the read-only instance.

RDS

InstanceName

string

Indicates the name of a read-only instance.

**

RemainDays

integer

Indicates the number of remaining days before the read-only instance expires.

0

DbInstType

string

Indicates the type of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database. The value is set to RDS.

RDS

Engine

string

Indicates the engine of the ApsaraDB RDS for MySQL instance that is used to store the data of the specified database.

MySQL

Examples

Success response

JSON format

{
  "PageSize": "10",
  "PageNumber": "1",
  "RequestId": "2F7F8080-9132-4279-85D0-B7E5C4305162",
  "Total": "1",
  "Success": true,
  "DbInstances": {
    "DbInstance": [
      {
        "ExpireTime": "1237486127634",
        "PayType": "PostPaid",
        "DBInstanceStatus": "1",
        "NetworkType": "VPC",
        "Port": 3306,
        "EngineVersion": "5.7",
        "DmInstanceId": "dm-hbgau1zp****",
        "ConnectUrl": "rm-bp1t1mk5a5b******.mysql.rds.aliyuncs.com",
        "ReadWeight": 30,
        "RdsInstType": "Primary",
        "RemainDays": 0,
        "DBInstanceId": "rm-bp1t1mk5a5bdj****",
        "DbInstType": "RDS",
        "Engine": "MySQL",
        "ReadOnlyInstances": {
          "ReadOnlyInstance": [
            {
              "ExpireTime": "123421352351234",
              "PayType": "Postpaid",
              "DBInstanceStatus": "1",
              "NetworkType": "VPC",
              "Port": 3306,
              "EngineVersion": "5.7",
              "DmInstanceId": "dm-hbgau1zp****",
              "ConnectUrl": "rm-bp1t1mk5a5b******.mysql.rds.aliyuncs.com",
              "ReadWeight": 70,
              "RdsInstType": "RDS",
              "InstanceName": "**",
              "RemainDays": 0,
              "DbInstType": "RDS",
              "Engine": "MySQL"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError The request processing has failed due to some unknown error.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.