Queries the custom ApsaraDB RDS for MySQL instances that are used to store the data of a database.

The list of ApsaraDB RDS for MySQL primary instances used by the database is returned. The ReadOnlyInstances parameter of each returned ApsaraDB RDS for MySQL primary instance indicates the read-only instances that are used by the primary instance to store the data of the specified database.

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 DescribeDrdsDbInstances

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

DrdsInstanceId String Yes drdshbga1138****

The ID of the PolarDB-X 1.0 instance.

DbName String Yes dbname

The name of the database whose custom ApsaraDB RDS for MySQL instances you want to query.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 30

The number of custom ApsaraDB RDS for MySQL instances to return on each page.

Response parameters

Parameter Type Example Description
PageSize String 10

The number of custom ApsaraDB RDS for MySQL instances returned on each page.

PageNumber String 1

The number of the returned page.

RequestId String 2F7F8080-9132-4279-85D0-B7E5C4305162

The ID of the request.

Total String 1

The total number of returned custom ApsaraDB RDS for MySQL instances.

Success Boolean true

Indicates whether the request is successful.

DbInstances Array of DbInstance

The list of custom ApsaraDB RDS for MySQL instances that are used to store the data of the specified database.

DbInstance
ExpireTime String 1237486127634

The time when the custom ApsaraDB RDS for MySQL instance expires.

PayType String PostPaid

The billing method of the custom ApsaraDB RDS for MySQL instance.

DBInstanceStatus String 1
  • The state of the custom ApsaraDB RDS for MySQL instance. 0: The instance is being created.
  • 1: The instance is running.
  • 3: The instance is being deleted.
  • 5: The instance is being restarted.
  • 6: The instance is being upgraded or downgraded.
  • 7: The instance is being backed up.
  • 8: The network type of the instance is being changed.
  • 9: The instance is being migrated.
  • 11: The data stored on the instance is being migrated.
  • 12: A disaster recovery instance is being generated.
  • 13: Data is being imported to the instance.
  • 14: Data is being imported to the instance from other ApsaraDB RDS for MySQL instances.
  • 15: A switchover is being performed.
  • 16: A temporary instance is being created.
  • 17: The network of the instance is being created.
  • 18: The instance is being cloned.
  • 19: The link is being changed.
  • 20: The read-only instances of the instance are being migrated.
NetworkType String VPC

The type of the network.

Port Integer 3306

The port that is used to connect to the instance.

EngineVersion String 5.7

The engine version of the database that is run on the instance. Examples: 5.5, 5.6, and 5.7.

DmInstanceId String dm-hbgau1zp****

The ID of the resource.

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

The URL that is used to connect to the instance. The URL is returned when the corresponding API operation of ApsaraDB RDS for MySQL is called.

ReadWeight Integer 30

The read weight of the instance in the specified database.

RdsInstType String Primary

Indicates whether the custom ApsaraDB RDS for MySQL instance is a primary instance or a read-only instance.

RemainDays Integer 0

The number of remaining days before the subscription instance expires.

DBInstanceId String rm-bp1t1mk5a5bdj****

The ID of the custom ApsaraDB RDS for MySQL instance.

DbInstType String RDS

The type of the custom ApsaraDB RDS for MySQL instance. Valid value: RDS.

Engine String MySQL

The engine of the database that is run on the instance. Example: MySQL.

ReadOnlyInstances Array of ReadOnlyInstance

The list of read-only instance of the custom ApsaraDB RDS for MySQL instance.

ReadOnlyInstance
ExpireTime String 123421352351234

The timestamp that indicates when the read-only instance expires.

PayType String Postpaid

The billing method of the read-only instance.

DBInstanceStatus String 1

The state of the read-only instance.

NetworkType String VPC

The network type of the read-only instance.

Port Integer 3306

The port used to connect to the instance.

EngineVersion String 5.7

The engine version of the database that is run on the read-only instance.

DmInstanceId String dm-hbgau1zp****

The ID of the resource.

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

The URL that is used to connect to the read-only instance. The URL is returned when the corresponding API operation of ApsaraDB RDS for MySQL is called.

ReadWeight Integer 70

The read weight of the read-only instance.

RdsInstType String RDS

The type of the read-only instance.

InstanceName String **

This parameter is reserved.

RemainDays Integer 0

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

DbInstType String RDS

The type of the read-only instance.

Engine String MySQL

The engine of the database that is run on the read-only instance.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDrdsDbInstances
&DrdsInstanceId=drdshbga1138****
&DbName=dbname
&PageNumber=1
&PageSize=30
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : "10",
  "PageNumber" : "1",
  "RequestId" : "2F7F8080-9132-4279-85D0-B7E5C4305162",
  "Total" : "1",
  "Success" : true,
  "DbInstances" : [ {
    "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" : [ {
      "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

HttpCode Error code Error message Description
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.