You can call this operation to query the list of AnalyticDB for PostgreSQL instances.

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
Action String Yes DescribeDBInstances

The operation that you want to perform. Set the value to DescribeDBInstances.

RegionId String Yes cn-hangzhou

The ID of the region.

DBInstanceDescription String No gp-xxxxxxxx

The description of the instance.

InstanceNetworkType String No VPC

The network type. Valid values:

  • VPC
  • Classic
  • If you do not specify this parameter, instances of all network types are returned.
DBInstanceIds String No gp-xxxxxxxxx, gp-xxxxxxx

The ID of the instance. Separate multiple IDs with commas (,).

Tag.N.Key String No key1

The key of the tag.

Tag.N.Value String No value1

The value of the tag.

PageSize Integer No 50

The number of entries to return on each page. Valid values: 30, 50, and 100. Default value: 30.

PageNumber Integer No 1

The number of the page to return. Valid values: any non-zero positive integer. The default value is 1.

Response parameters

Parameter Type Example Description
Items Array

The details of the instance.

DBInstance
ConnectionMode String Standard

The access mode of the instance. Valid values:

  • Standard
  • Safe
CreateTime String 2019-09-08T16:00:00Z

The time when the instance was created.

DBInstanceDescription String gp-xxxxxxxxxx

The description of the instance.

DBInstanceId String gp-xxxxxxxx

The ID of the instance.

DBInstanceNetType String Internet

The type of network connection to be used by the instance.

DBInstanceStatus String Running

The status of the instance. For more information, see Instance statuses.

Engine String gpdb

The engine type of the instance.

EngineVersion String 4.3

The version of the database engine.

ExpireTime String 2019-09-08T16:00:00Z

The time when the instance is scheduled to expire. Pay-as-you-go instances do not expire.

InstanceDeployType String public

The type of the cluster. Valid values:

  • cell: indicates an exclusive cluster
  • public: indicates a shared cluster
InstanceNetworkType String VPC

The network type of the instance. Valid values:

  • VPC
  • Classic
LockMode String Unlock

The locking mode of the instance. Valid values:

  • Unlock: The instance is not locked.
  • ManualLock: The instance is locked manually.
  • LockByExpiration: The instance is locked automatically after it expires.
  • LockByRestoration: The instance is locked automatically before a rollback.
  • LockByDiskQuota: The instance is locked automatically when the disk space is full.
LockReason String Unknow

The reason why the instance is locked.

PayType String Prepaid

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
RegionId String cn-hangzhou

The ID of the region.

Tags Array

The tags of the instance.

Tag
Key String key1

The key of the tag.

Value String value1

The value of the tag.

VSwitchId String vsw-xxxxxxxxx

The ID of the VSwitch.

VpcId String vpc-xxxxxxxxxx

The ID of the VPC.

ZoneId String cn-hangzhou

The ID of the zone.

PageNumber Integer 1

The number of the returned page.

PageRecordCount Integer 2

The number of records on the current page.

RequestId String BBE00C04-A3E8-4114-881D-0480A72CB92E

The ID of the request.

TotalRecordCount Integer 2

The total number of records.

Examples

Sample requests

https://gpdb.aliyuncs.com/?Action=DescribeDBInstances
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<Items>
    <DBInstance>
        <LockMode>Unlock</LockMode>
        <DBInstanceNetType>1</DBInstanceNetType>
        <DBInstanceId>gp-xxxxxxx</DBInstanceId>
        <ZoneId>cn-hangzhou-e</ZoneId>
        <DBInstanceDescription>gpdb_test</DBInstanceDescription>
        <InstanceNetworkType>Classic</InstanceNetworkType>
        <VSwitchId>vsw-xxxxxxx</VSwitchId>
        <VpcId>vpc-xxxxxxx</VpcId>
        <Engine>gpdb</Engine>
        <ExpireTime>2019-06-27T16:00:00Z</ExpireTime>
        <CreateTime>2018-06-27T12:07:11Z</CreateTime>
        <RegionId>cn-hangzhou</RegionId>
        <EngineVersion>4.3</EngineVersion>
        <LockReason/>
        <DBInstanceStatus>Running</DBInstanceStatus>
        <PayType>Prepaid</PayType>
    </DBInstance>
    <DBInstance>
        <LockMode>Unlock</LockMode>
        <DBInstanceNetType>1</DBInstanceNetType>
        <DBInstanceId>gp-xxxxxxx</DBInstanceId>
        <ZoneId>cn-hangzhou-e</ZoneId>
        <DBInstanceDescription>gp-xxxxxxx</DBInstanceDescription>
        <InstanceNetworkType>Classic</InstanceNetworkType>
        <VSwitchId>vsw-xxxxxxx</VSwitchId>
        <VpcId>vpc-xxxxxxx</VpcId>
        <Engine>gpdb</Engine>
        <ExpireTime>2999-09-08T16:00:00Z</ExpireTime>
        <CreateTime>2018-06-27T11:51:46Z</CreateTime>
        <RegionId>cn-hangzhou</RegionId>
        <EngineVersion>4.3</EngineVersion>
        <LockReason/>
        <DBInstanceStatus>Running</DBInstanceStatus>
        <PayType>Postpaid</PayType>
    </DBInstance>
</Items>
<PageNumber>1</PageNumber>
<TotalRecordCount>2</TotalRecordCount>
<RequestId>BBE00C04-A3E8-4114-881D-0480A72CB92E</RequestId>
<PageRecordCount>2</PageRecordCount>

JSON format

{
    "Items":{
        "DBInstance":[
            {
                "LockMode":"Unlock",
                "DBInstanceNetType":"1",
                "DBInstanceId":"gp-xxxxxxx",
                "ZoneId":"cn-hangzhou-e",
                "DBInstanceDescription":"gpdb_test",
                "InstanceNetworkType":"Classic",
                "VSwitchId":"vsw-xxxxxxx",
                "VpcId":"vpc-xxxxxxx",
                "Engine":"gpdb",
                "ExpireTime":"2019-06-27T16:00:00Z",
                "CreateTime":"2018-06-27T12:07:11Z",
                "RegionId":"cn-hangzhou",
                "EngineVersion":"4.3",
                "LockReason":"",
                "DBInstanceStatus":"Running",
                "PayType":"Prepaid"
            },
            {
                "LockMode":"Unlock",
                "DBInstanceNetType":"1",
                "DBInstanceId":"gp-xxxxxxx",
                "ZoneId":"cn-hangzhou-e",
                "DBInstanceDescription":"gp-xxxxxxx",
                "InstanceNetworkType":"Classic",
                "VSwitchId":"vsw-xxxxxxx",
                "VpcId":"vpc-xxxxxxx",
                "Engine":"gpdb",
                "ExpireTime":"2999-09-08T16:00:00Z",
                "CreateTime":"2018-06-27T11:51:46Z",
                "RegionId":"cn-hangzhou",
                "EngineVersion":"4.3",
                "LockReason":"",
                "DBInstanceStatus":"Running",
                "PayType":"Postpaid"
            }
        ]
    },
    "PageNumber":1,
    "TotalRecordCount":2,
    "RequestId":"BBE00C04-A3E8-4114-881D-0480A72CB92E",
    "PageRecordCount":2
}

Error code

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