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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
drds:DescribeDrdsDbInstances |
get |
*instance
|
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:
|
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:
|
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 |
| 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.
|
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:
|
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.