View all RDS instances created in the DRDS database

When you query the list of primary RDS instances of the DRDS database, the ReadOnlyInstances attribute of each primary RDS instance specifies the list of read-only RDS instances used by the primary RDS for the current 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
DbName String Yes dbname

DRDS database name

DrdsInstanceId String Yes drdsInstanceId

DRDS instance ID

AccessKeyId String No ASU678UDIN9Hd******

Access Key

PageNumber String Optional 1

The number of the page to return.

PageSize String Optional 30

The number of entries to return on each page.

Response parameters

Prameter Type Sample response Description
DbInstances

List of storage instances under the DRDS database

DbInstance

List of storage instances under the DRDS database

ConnectUrl String rm-m5xxxxxxxxx82.mysql.rds.aliyuncs.com

The connection address of the storage instance. The connection address returned when the corresponding storage (such as RDS) interface is called

DBInstanceId String rm-m5xxxxxxxxx82

Storage instance ID

DBInstanceStatus String 1

0: The storage instance is being created.

1: The storage instance is running.

3: The storage instance is being deleted.

5: The storage instance is being restarted.

6: The storage instance is being upgraded or downgraded.

7: The storage instance is being backed up.

8: The network type is being changed.

9: The storage instance is being migrated.

11: Data is being migrated.

12: The disaster recovery instance is being generated.

13: Data is being imported.

14: Data is being imported from other RDS instances.

15: The switchover is being performed.

16: A temporary storage instance is being created.

17: The network is being created.

18: The storage instance is being cloned.

19: The link is being changed.

20: The read-only storage instance is being migrated.

DbInstType String RDS

Storage instance type. Only RDS is available.

Engine String MySQL

Storage engines, such as RDS and MySQL

EngineVersion String 5.7

Storage Engine version, such as 5.7,5.6, and 5.5 of the RDS for MySQL

ExpireTime String 1237486******

Storage instance expiration time

NetworkType String VPC

Network Type

PayType String PostPaid

Billing Method

Port Integer 3306

Port Number

RdsInstType String Primary

Identifies whether it is an RDS master or read-only instance

ReadOnlyInstances

Read-only instance list of the storage instance

ReadOnlyInstance

Read-only instance list of the storage instance

ConnectUrl String rm-m5xxxxxxxxx82.mysql.rds.aliyuncs.com

The connection address of the storage instance. The connection address returned when the corresponding storage (such as RDS) interface is called

DBInstanceStatus String 1

Storage instance status

DbInstType String RDS

Instance type

Engine String MySQL

Storage instance engine

EngineVersion String 5.7

Instance engine version

ExpireTime String 123421352******

Storage instance expiration timestamp

Instance name String rm-m5xxxxxxxxx82

Invalid field

NetworkType String VPC

Network type

PayType String Postpaid

The billing method.

Port Integer 3306

Instance access port

RdsInstType String RDS

Instance Type

ReadWeight Integer 70

Instance read ratio

RemainDays Integer 0

The remaining validity period of the instance.

ReadWeight Integer 30

Weight in the DRDS database

RemainDays Integer 0

Remaining expiration days for a subscription instance

PageNumber String 1

The number of the page to return.

PageSize String 10

The page size

RequestId String 2F7F8080-9132-4279-85D0-B7E5C4******

The ID of the request.

Success Boolean true

The data returned, which indicates whether the operation is successful.

Total String 1

RDS Primary instances

Examples

Sample request


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

Sample success responses

XML format

<DescribeDrdsDbInstances>
	  <PageSize>10</PageSize>
	  <RequestId>658B6F25-442A-4996-8AAE-F77DAF******</RequestId>
	  <PageNumber>1</PageNumber>
	  <Total>1</Total>
	  <DbInstances>
		    <DbInstance>
			      <DbInstType>RDS</DbInstType>
			      <ReadOnlyInstances></ReadOnlyInstances>
			      <EngineVersion>5.7</EngineVersion>
			      <DBInstanceStatus>1</DBInstanceStatus>
			      <Port>3306</Port>
			      <PayType>Postpaid</PayType>
			      <ReadWeight>100</ReadWeight>
			      <ConnectUrl>rm-m5xxxxxxxxx82.mysql.rds.aliyuncs.com</ConnectUrl>
			      <DBInstanceId>rm-m5xxxxxxxxx82</DBInstanceId>
			      <NetworkType>VPC</NetworkType>
			      <RdsInstType>Primary</RdsInstType>
			      <ExpireTime></ExpireTime>
			      <RemainDays>0</RemainDays>
			      <Engine>MySQL</Engine>
		    </DbInstance>
	  </DbInstances>
	  <Success>true</Success>
</DescribeDrdsDbInstances>

JSON format

{
	"PageNumber":1,
	"PageSize":10,
	"RequestId":"658B6F25-442A-4996-8AAE-F77DAF******",
	"DbInstances":{
		"DbInstance":[
			{
				"RemainDays":0,
				"ReadOnlyInstances":{
					"ReadOnlyInstance":[]
				},
				"DBInstanceId":"rm-m5xxxxxxxxx82",
				"ReadWeight":100,
				"RdsInstType":"Primary",
				"DbInstType":"RDS",
				"ConnectUrl":"rm-m5xxxxxxxxx82.mysql.rds.aliyuncs.com",
				"Engine":"MySQL",
				"NetworkType":"VPC",
				"Port":3306,
				"ExpireTime":"",
				"EngineVersion":"5.7",
				"DBInstanceStatus":1,
				"PayType":"Postpaid"
			}
		]
	},
	"Success":true,
	"Total":1
}

Error codes

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