Queries DescribeDbInstances of the storage layer, such as RDS or PolarDB.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Required | DescribeDbInstances | The operation that you want to perform. The value is DescribeDbInstances. |
DrdsInstanceId | String | Required | drds************ | The ID of a DRDS instance. |
Search | String | No | pc-*************** | The ID of the storage or cluster. |
DbInstType | String | No | Apsara PolarDB | Storage layer type. Valid values: POLARDB or RDS. |
PageNumber | Integer | Optional | 1 | The page number of the returned page. |
PageSize | Integer | Optional | 10 | The number of entries to return on each page. |
RegionId | String | No | cn-hangzhou | The ID of the region. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Items | Array | The details of the instance. | |
DBInstance | |||
DBInstanceDescription | String | test | The description of the storage instance. |
DBInstanceId | String | rm-**************** | The ID of the storage instance. |
DBInstanceStatus | Integer | 1 | Storage layer instance status. Valid values:
|
DBInstanceType | String | Primary | The storage layer instance type. |
Engine | String | MySQL | The engine of the storage instance. |
EngineVersion | String | 5.7 | The version of the engine for the storage instance. |
InstanceNetworkType | String | VPC | The network type of the storage layer. Valid values:
|
ReadOnlyDBInstanceId | List | [] | The details about a read-only storage instance. |
RegionId | Boolean | cn-hangzhou | The ID of the region where the storage instance resides. |
ZoneId | String | cn-hangzhou-a | The ID of the zone where the storage instance resides. |
RequestId | String | Configure Internal Audit alarm rules * | The ID of the request |
Examples
Sample requests
http(s)://[drds.aliyuncs.com]/?Action=DescribeDbInstances
&DrdsInstanceId=drds************
&Search=pc-***************
&DbInstType=POLARDB
&PageNumber=1
&PageSize=10
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
<RequestId>293275B3-8FC0-4619-A26E-6F062F******</RequestId>
<Items>
<DBInstance>
<EngineVersion>5.7</EngineVersion>
<DBInstanceStatus>1</DBInstanceStatus>
<ZoneId>cn-hangzhou-e</ZoneId>
<DBInstanceId>rm-**************</DBInstanceId>
<ReadOnlyDBInstanceId>
</ReadOnlyDBInstanceId>
<DBInstanceType>Primary</DBInstanceType>
<RegionId>cn-hangzhou</RegionId>
<Engine>MySQL</Engine>
<DBInstanceDescription>test</DBInstanceDescription>
<InstanceNetworkType>Classic</InstanceNetworkType>
</DBInstance>
<DBInstance>
<EngineVersion>5.7</EngineVersion>
<DBInstanceStatus>1</DBInstanceStatus>
<ZoneId>cn-hangzhou-e</ZoneId>
<DBInstanceId>rm-**************</DBInstanceId>
<ReadOnlyDBInstanceId>
</ReadOnlyDBInstanceId>
<DBInstanceType>Primary</DBInstanceType>
<RegionId>cn-hangzhou</RegionId>
<Engine>MySQL</Engine>
<DBInstanceDescription>test</DBInstanceDescription>
<InstanceNetworkType>Classic</InstanceNetworkType>
</DBInstance>
</Items>
JSON
format
{
"RequestId": "293275B3-8FC0-4619-A26E-6F062F******",
"Items": {
"DBInstance": [
{
"EngineVersion": "5.7",
"DBInstanceStatus": 1,
"ZoneId": "cn-hangzhou-e",
"DBInstanceId": "rm-**************",
"ReadOnlyDBInstanceId": {
"ReadOnlyDBInstanceId": []
},
"DBInstanceType": "Primary",
"RegionId": "cn-hangzhou",
"Engine": "MySQL",
"DBInstanceDescription": "test",
"InstanceNetworkType": "Classic"
},
{
"EngineVersion": "5.7",
"DBInstanceStatus": 1,
"ZoneId": "cn-hangzhou-e",
"DBInstanceId": "rm-**************",
"ReadOnlyDBInstanceId": {
"ReadOnlyDBInstanceId": []
},
"DBInstanceType": "Primary",
"RegionId": "cn-hangzhou",
"Engine": "MySQL",
"DBInstanceDescription": "test",
"InstanceNetworkType": "Classic"
}
]
}
}
Errors
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | ActionUnauthorized | The specified action is not available for you | The error message returned because you are not authorized to perform this action. Perform RAM authorization first. |
For a list of error codes, visit the API Error Center.