Queries ApsaraDB RDS for MySQL instances that are used to store the data of a 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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeDrdsDbInstances

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

DbNameStringYesdbname

The name of the database.

DrdsInstanceIdStringYesdrdshbga1138****

The ID of the PolarDB-X 1.0 instance.

PageNumberIntegerNo1

The number of the page to return.

PageSizeIntegerNo30

The number of entries to return on each page.

Response parameters

ParameterTypeExampleDescription
DbInstancesArray of DbInstance

Indicates information about the ApsaraDB RDS for MySQL instances that are used to store the data of the specified database.

DbInstance
ConnectUrlStringrm-m5**********82.mysql.rds.aliyuncs.com

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.

DBInstanceIdStringrm-m5*********82

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

DBInstanceStatusString1

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.
DbInstTypeStringRDS

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.

DmInstanceIdStringdm-hbgau1zp****

Indicates the ID of a resource.

EngineStringMySQL

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

EngineVersionString5.7

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

ExpireTimeString1568620311000

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

NetworkTypeStringVPC

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

PayTypeStringPostPaid

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.
PortInteger3306

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.

RdsInstTypeStringPrimary

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.
ReadOnlyInstancesArray of ReadOnlyInstance

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.

ReadOnlyInstance
ConnectUrlStringrm-m5*********82.mysql.rds.aliyuncs.com

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.

DBInstanceStatusString1

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.
DbInstTypeStringRDS

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.

DmInstanceIdStringdm-*************

Indicates the ID of a resource.

EngineStringMySQL

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

EngineVersionString5.7

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

ExpireTimeString1603209690000

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

InstanceNameStringrm-m5xxxxxxxxx82

Indicates the name of a read-only instance.

NetworkTypeStringVPC

Indicates the network type of the read-only instance.

PayTypeStringPostpaid

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.
PortInteger3306

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

RdsInstTypeStringRDS

Indicates the type of the read-only instance.

ReadWeightInteger70

Indicates the read weight of the read-only instance.

RemainDaysInteger0

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

ReadWeightInteger30

Indicates the read weight of the read-only instance.

RemainDaysInteger0

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

PageNumberString1

Indicates the page number of the returned page.

PageSizeString10

Indicates the number of entries returned per page.

RequestIdString2F7F8080-9132-4279-85D0-B7E5C4305162

Indicates the ID of the request.

SuccessBooleantrue

Indicates whether the request is successful.

TotalString1

Indicates the number of primary ApsaraDB RDS for MySQL instances.

Examples

Sample requests

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

Sample success responses

XML format

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

JSON format

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

Error codes

HttpCodeError codeError messageDescription
500InternalErrorThe request processing has failed due to some unknown error.The error message returned because an internal error has occurred.

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