View RDS instance list

Last Updated: Dec 06, 2017

Description

Show the instance list or the instance list authorized by RAM.

Request parameters

Name Type Required? Description
Action String Yes Required parameter. Value: DescribeDBInstances.
RegionId String Yes Instance region, viewed through the DescribeRegions function.
Engine String No Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS. If no value is specified, all types are returned.
DBInpe String No Instance type. Value options:
  • Primary: primary instance;
  • Readonly: read-only instance;
  • Guard: disaster recovery instance;
  • Temp: temporary instance;
  • If no value is specified, all types are returned.
InstanceNetworkType String No
  • VPC: VPC instance;
  • Classic: classic instance.
  • If no value is specified, both types are returned.
ConnectionMode String No
  • Performance: standard access mode;
  • Safety: high security access mode.
  • If no value is specified, both modes are returned.
PageSize Integer No Number of records on each page. Value options: 30, 50, and 100. Default value: 30.
PageNumber Integer No Page number, which must be greater than 0, but must not exceed the maximum Integer value. Default value: 1.

Return parameters

Name Type Description
<Public Return Parameters> - For more information, see Public parameters.
Databases List<Database> Data composed of the databases.
PageNumber Integer Page number.
TotalRecordCount Integer Total number of records.
PageRecordCount Integer Number of DB instances on the current page.
Items List<DBInstance> Array composed of DB instances.

DBInstance parameters

Name Type Description
DBInstanceId String Instance ID.
DBInstanceDescription String Instance description.
PayType String Billing method. Value options: Postpaid: Pay-As-You-Go; Prepaid: Subscription.
DBInstanceType String
  • Primary: primary instance;
  • ReadOnly: read-only instance;
  • Guard: disaster recovery instance;
  • Temp: temporary instance.
InstanceNetworkType String Classic: classic network; VPC: VPC network.
ConnectionMode String Performance: standard access mode; Safety: high security access mode.
RegionId String Region.
ExpireTime String Expiration time. Pay-As-You-Go instances never expire.
DBInstanceClass String For more information, see the Appendix.
Engine String Database type.
DBInstanceNetType String Internet: public network; Intranet: private network.
LockMode String
  • Unlock: normal;
  • ManualLock: locked when manually triggered;
  • LockByExpiration: automatically locked upon expiration;
  • LockByRestoration: automatically locked before instance rollback;
  • LockByDiskQuota: automatically locked when the instance space is full.
LockReason String Reason why an instance is locked.
MasterInstanceId String ID of the primary instance. If this parameter is not returned (that is, if it is null), the current instance is a primary instance.
GuardDBInstanceId String If a disaster recovery instance is attached to the current instance, the ID of the disaster recovery instance applies.
TempDBInstanceId String If a temporary instance is attached to the current instance, the ID of the temporary instance applies.
ReadOnlyDBInstanceId List<ReadOnlyDBInstanceId> ID list of read-only instances attached to the primary instance.

ReadOnlyDBInstanceId parameters

Name Type Description
ReadOnlyDBInstanceId String ID of a read-only instance.

Example

  • Request example

    1. https://rds.aliyuncs.com/?Action=DescribeDBInstances
    2. &RegionId=cn-hangzhou
    3. &Engine=MySQL
    4. &<Public Request Parameters>
  • Return example

    XML format:

    1. <DescribeDBInstancesResponse>
    2. <PageRecordCount>2</PageRecordCount>
    3. <Items>
    4. <DBInstance>
    5. <DBInstanceDescription>testforRemarks</DBInstanceDescription>
    6. <ExpireTime>2014-10-10T16:00:00Z</ExpireTime>
    7. <DBInstanceId>rdsmjfirvmjfirv</DBInstanceId>
    8. <DBInstanceNetType>Internet</DBInstanceNetType>
    9. <PayType>Prepaid</PayType>
    10. <DBInstanceStatus>Running</DBInstanceStatus>
    11. <DBInstanceType>Primary</DBInstanceType>
    12. <Engine>MySQL</Engine>
    13. <LockMode>Unlock</LockMode>
    14. <LockReason></LockReason>
    15. <RegionId>cn-hangzhou</RegionId>
    16. <ZoneId>cn-hangzhou-a</ZoneId>
    17. <MasterInstanceId></MasterInstanceId>
    18. <GuardDBInstanceId></GuardDBInstanceId>
    19. <TempDBInstanceId></TempDBInstanceId>
    20. <ReadOnlyDBInstanceIds>
    21. <ReadOnlyDBInstanceId></ReadOnlyDBInstanceId>
    22. </ReadOnlyDBInstanceIds>
    23. </DBInstance>
    24. <DBInstance>
    25. <DBInstanceDescription>testforcreate</DBInstanceDescription>
    26. <ExpireTime></ExpireTime>
    27. <DBInstanceId>rdsabqumfabqumf</DBInstanceId>
    28. <DBInstanceNetType>Intranet</DBInstanceNetType>
    29. <PayType>Postpaid</PayType>
    30. <DBInstanceStatus>Running</DBInstanceStatus>
    31. <DBInstanceType>Primary</DBInstanceType>
    32. <Engine>MySQL</Engine>
    33. <LockMode>Unlock</LockMode>
    34. <LockReason></LockReason>
    35. <RegionId>cn-hangzhou</RegionId>
    36. <MasterInstanceId></MasterInstanceId>
    37. <GuardDBInstanceId></GuardDBInstanceId>
    38. <TempDBInstanceId></TempDBInstanceId>
    39. <ReadOnlyDBInstanceIds>
    40. <ReadOnlyDBInstanceId></ReadOnlyDBInstanceId>
    41. </ReadOnlyDBInstanceIds>
    42. </DBInstance>
    43. </Items>
    44. <PageNumber>1</PageNumber>
    45. <TotalRecordCount>2</TotalRecordCount>
    46. <RequestId>2553A660-E4EB-4AF4-A402-8AFF70A49143</RequestId>
    47. </DescribeDBInstancesResponse>

    JSON format:

    1. {
    2. "PageNumber": 1,
    3. "Items": {
    4. "DBInstance": [
    5. {
    6. "Engine": "MySQL",
    7. "DBInstanceType": "Primary",
    8. "DBInstanceStatus": "Running",
    9. "DBInstanceDescription": "testforRemarks",
    10. "LockMode": "Unlock",
    11. "RegionId": "cn-hangzhou",
    12. "ZoneId": "cn-hangzhou-a",
    13. "DBInstanceId": "rdsmjfirvmjfirv",
    14. "PayType": "Prepaid",
    15. "ExpireTime": "2014-10-10T16:00:00Z",
    16. "DBInstanceNetType": "Internet",
    17. "LockReason": "",
    18. "MasterInstanceId": "",
    19. "GuardDBInstanceId ": "",
    20. "TempDBInstanceId": "",
    21. "ReadOnlyDBInstanceIds": {
    22. "ReadOnlyDBInstanceId": []
    23. }
    24. },
    25. {
    26. "Engine": "MySQL",
    27. "DBInstanceType": "Primary",
    28. "DBInstanceStatus": "Running",
    29. "DBInstanceDescription": "testforcreate",
    30. "LockMode": "Unlock",
    31. "RegionId": "cn-hangzhou",
    32. "DBInstanceId": "rdsabqumfabqumf",
    33. "PayType": "Postpaid",
    34. "ExpireTime": "",
    35. "DBInstanceNetType": "Intranet",
    36. "LockReason": "",
    37. "MasterInstanceId": "",
    38. "GuardDBInstanceId ": "",
    39. "TempDBInstanceId": "",
    40. "ReadOnlyDBInstanceIds": {
    41. "ReadOnlyDBInstanceId": []
    42. }
    43. }
    44. ]
    45. } ,
    46. "TotalRecordCount": 2,
    47. "PageRecordCount": 2,
    48. "RequestId": "2553A660-E4EB-4AF4-A402-8AFF70A49143"
    49. }
Thank you! We've received your feedback.