You can call this operation to view the list of RDS instances or the list of instances that are authorized by RAM.
Debugging
You can use OpenAPI Explorer to perform debugging.
OpenAPI Explorer provides various functions to simplify API usage. For example, you can retrieve APIs, call APIs, and generate SDK sample code.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDBInstances |
The operation that you want to perform. Set this parameter to DescribeDBInstances. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region. You can call the DescribeRegions API operation to view the latest regions. |
ClientToken | String | No | ETnLKlblzczshOTUbOCzxxxxxxx |
The client token that is used to guarantee the idempotency of requests. The client token is generated by the client and is unique among different requests. It is a string of up to 64 ASCII characters. |
Engine | String | No | MySQL |
The type of the database. Valid values:
The system returns all the database types by default. |
ZoneId | String | No | cn-hangzhou-a |
The ID of the zone. |
DBInstanceStatus | String | No | Running |
The status of the instance. For more information, see Instance status table. |
Expired | String | No | True |
Indicates whether the instance expires. Valid values:
|
SearchKey | String | No | rm-uf6w |
The search key that can be used for fuzzy search based on the instance ID or instance description. |
DBInstanceId | String | No | rm-uf6wjk5xxxxxxx |
The ID of the instance. |
DBInstanceType | String | No | Primary |
The type of the instance. Valid values:
The system returns all the instance types by default. |
PageSize | Integer | No | 30 |
The number of records per page. Valid values:
Default value: 30. |
PageNumber | Integer | No | 1 |
The page number, which is greater than zero and up to the maximum value of an integer. Default value: 1. |
InstanceNetworkType | String | No | Classic |
The network type of the instance. Valid values:
The system returns instances of all the network types by default. |
VpcId | String | No | vpc-uf6f7l4fg90xxxxxxxxxx |
The ID of the VPC. |
VSwitchId | String | No | vsw-uf6adz52c2pxxxxxxxxxx |
The ID of the VSwitch. |
DBInstanceClass | String | No | rds.mys2.small |
The type of the instance. For more information, see Instance types. |
EngineVersion | String | No | 5.7 |
The version of the database. |
PayType | String | No | Postpaid |
The billing method. Valid values:
|
ConnectionMode | String | No | Standard |
The access mode of the instance. Valid values:
The system returns all the access modes of the instance by default. |
AccessKeyId | String | No | LTAIfCxxxxxxx |
The AccessKey ID that Alibaba Cloud issues to a user for service access. |
proxyId | String | No | API |
The ID of the proxy mode. |
ResourceGroupId | String | No | rg-acfmyxxxxx |
The ID of the resource group. |
Tags | String | No | {“key1”:”value1”} |
The tag is a key-value pair, which includes the TagKey and TagValue. You can specify up to five tag pairs in a single request. Format: {"key1":"value1","key2":"value2"...}. |
Tag. 1.key | String | No | Tagkey1 |
The TagKeys of the first set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 2.key | String | No | Tagkey2 |
The TagKeys of the second set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 3.key | String | No | Tagkey3 |
The TagKeys of the third set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 4.key | String | No | Tagkey4 |
The TagKeys of the fourth set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 5.key | String | No | Tagkey5 |
The TagKeys of the fifth set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 1.value | String | No | Tagvalue1 |
The TagValues of the first set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 2.value | String | No | Tagvalue2 |
The TagValues of the second set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 3.value | String | No | Tagvalue3 |
The TagValues of the third set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 4.value | String | No | Tagvalue4 |
The TagValues of the fourth set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Tag. 5.value | String | No | Tagvalue5 |
The TagValues of the fifth set of tags. Each tag includes a TagKey and a TagValue. Up to five key-value pairs can be entered in a single request. The TagKey is required, and the TagValue is optional. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageRecordCount | Integer | 10 |
The number of instances on the current page. |
TotalRecordCount | Integer | 100 |
The total number of records. |
PageNumber | Integer | 1 |
The page number. |
RequestId | String | 1AD222E9-E606-4A42-BF6D-8A4442913CEF |
The ID of the request. |
Items | N/A | N/A |
The array that consists of instance data. |
DBInstanceId | String | rm-uf6wjk5xxxxxxxxxx |
The ID of the instance. |
DBInstanceDescription | String | Test database |
The description of the instance. |
PayType | String | Postpaid |
The billing method of the instance. Valid values:
|
DBInstanceType | String | Primary |
The type of the instance role. Valid values:
|
InstanceNetworkType | String | Classic |
The network type of the instance. Valid values:
|
ConnectionMode | String | Performance |
The access mode of the instance. Valid values:
|
RegionId | String | cn-hangzhou |
The ID of the region. |
ExpireTime | String | 2019-02-27T16:00:00Z |
The expiration time in the following UTC format: yyyy-MM-ddTHH:mm:ss. Note Pay-As-You-Go instances never expire.
|
DBInstanceStatus | String | Running |
The status of the instance. For more information, see Instance status table. |
Engine | String | MySQL |
The type of the database. |
DBInstanceNetType | String | Internet |
The network type of the instance. Valid values:
|
LockMode | String | Unlock |
The lock status of the instance. Valid values:
|
LockReason | String | instance_expired |
The reason why the instance is locked. |
MasterInstanceId | String | rm-uf6wjk5xxxxxxxxxx |
The ID of the primary instance. If this parameter is not returned (it is null), the instance is a primary instance. |
GuardDBInstanceId | String | rm-uf64zsuxxxxxxxxxx |
The ID of the disaster recovery instance. |
TempDBInstanceId | String | rm-uf64zsuxxxxxxxxxx |
The ID of the temporary instance. |
AutoUpgradeMinorVersion | String | Auto |
The method of upgrading an instance to a minor version. Valid values:
|
Category | String | Basic |
The instance edition:
|
CreateTime | String | 2018-11-05T11:26:02Z |
The creation time in the following UTC format: yyyy-MM-ddTHH:mm:ssZ. |
DBInstanceClass | String | rds.mys2.small |
TThe type of the instance. For more information, see Instance types. |
DBInstanceStorageType | String | ModuleList. 4.ModuleCode |
The storage type of the instance. |
DestroyTime | String | 2018-11-05T11:26:02Z |
The time when the instance is destroyed. |
EngineVersion | String | 5.7 |
The version of the database. |
MutriORsignle | Boolean | true |
Indicates whether the instance is deployed in multiple zones. Valid values:
|
ReadOnlyDBInstanceIds | N/A | N/A |
The IDs of the read-only instances. |
DBInstanceId | String | rr-uf6wjk5xxxxxxx |
The ID of the read-only instance. |
ResourceGroupId | String | rg-acfmyxxxxxxx |
The ID of the resource group. |
VSwitchId | String | vsw-uf6adz52c2pxxxxxxx |
The ID of the VSwitch. |
VpcCloudInstanceId | String | rm-uf6wjk5xxxxxxx |
The ID of the VPC instance. |
VpcId | String | vpc-uf6f7l4fg90xxxxxxx |
The ID of the VPC. |
ZoneId | String | cn-hangzhou-a |
The ID of the zone. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/? Action=DescribeDBInstances
&RegionId=cn-hangzhou
&<Common request parameters>
Successful response examples
XML
format
<DescribeDBInstancesResponse>
<Items>
<DBInstance>
<LockMode>Unlock</LockMode>
<DBInstanceNetType>Intranet</DBInstanceNetType>
<DBInstanceClass>ppas.x4.xlarge.2</DBInstanceClass>
<ResourceGroupId>rg-acfnt75uxxxxx</ResourceGroupId>
<DBInstanceId>rm-dj120j44xxxxx</DBInstanceId>
<VpcCloudInstanceId></VpcCloudInstanceId>
<ZoneId>cn-beijing-MAZ3(c,e)</ZoneId>
<ReadOnlyDBInstanceIds></ReadOnlyDBInstanceIds>
<ConnectionMode>Standard</ConnectionMode>
<InstanceNetworkType>Classic</InstanceNetworkType>
<Engine>PPAS</Engine>
<MutriORsignle>true</MutriORsignle>
<InsId>1</InsId>
<ExpireTime></ExpireTime>
<CreateTime>2019-03-20T02:18:02Z</CreateTime>
<DBInstanceType>Primary</DBInstanceType>
<RegionId>cn-beijing</RegionId>
<EngineVersion>10.0</EngineVersion>
<LockReason></LockReason>
<DBInstanceStatus>Running</DBInstanceStatus>
<PayType>Postpaid</PayType>
</DBInstance>
</Items>
<TotalRecordCount>1</TotalRecordCount>
<PageNumber>1</PageNumber>
<RequestId>0C2B0363-2707-4300-9900-0A65846CE48E</RequestId>
<PageRecordCount>1</PageRecordCount>
</DescribeDBInstancesResponse>
JSON
format
{
"Items":{
"DBInstance":[
{
"LockMode":"Unlock",
"DBInstanceNetType":"Intranet",
"DBInstanceClass":"ppas.x4.xlarge.2",
"ResourceGroupId":"rg-acfnt75uxxxxx",
"DBInstanceId":"rm-dj120j44xxxxx",
"VpcCloudInstanceId":"",
"ZoneId":"cn-beijing-MAZ3(c,e)",
"ReadOnlyDBInstanceIds":{
"ReadOnlyDBInstanceId":[]
},
"ConnectionMode":"Standard",
"InstanceNetworkType":"Classic",
"Engine":"PPAS",
"MutriORsignle":true,
"InsId":1,
"ExpireTime":"",
"RegionId":"cn-beijing",
"DBInstanceType":"Primary",
"CreateTime":"2019-03-20T02:18:02Z",
"LockReason":"",
"EngineVersion":"10.0",
"DBInstanceStatus":"Running",
"PayType":"Postpaid"
}
]
},
"PageNumber":1,
"TotalRecordCount":1,
"RequestId":"0C2B0363-2707-4300-9900-0A65846CE48E",
"PageRecordCount":1
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidDBInstanceType.ValueNotSupport | The specified parameter"DBInstanceType" is not valid. | The value of the DBInstanceType parameter is invalid. |
For a list of error codes, visit the API Error Center.