Queries 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 region ID of the instance.

DBInstanceDescription String No gp-xxxxxxxx

The description of the instance.

InstanceNetworkType String No VPC

The network type of the instance. Valid values:

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

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

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. The value must be an integer that is greater than 0. Default value: 1.

Tag.N.Key String No key1

The tag key of the instance.

Tag.N.Value String No value1

The tag value of the instance.

Response parameters

Parameter Type Example Description
TotalRecordCount Integer 2

The total number of entries returned.

PageRecordCount Integer 2

The number of entries returned on the current page.

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

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

Items Array of DBInstance

Details about the instances.

DBInstance
VpcId String vpc-xxxxxxxxxx

The VPC ID of the instance.

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

The expiration time of the instance. This parameter is not returned for pay-as-you-go instances.

DBInstanceNetType String Internet

The type of network interface card (NIC) that is used by the instance.

InstanceDeployType String cluster
  • cluster: Elastic Compute Service (ECS) instance
  • replicaSet: physical machine
StorageType String cloud_essd

The storage type of the instance. Valid values:

  • cloud_essd: enhanced SSD (ESSD)
  • cloud_efficiency: ultra disk
CreateTime String 2019-09-08T16:00:00Z

The time when the instance was created.

PayType String Prepaid

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
Tags Array of Tag

Details about the tags.

Tag
Key String key1

The tag key of the instance.

Value String value1

The tag value of the instance.

LockReason String Unknow

The reason why the instance is locked.

DBInstanceStatus String Running

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

ConnectionMode String Standard

The access mode of the instance. Valid values:

  • Standard
  • Safe
LockMode String Unlock

Indicates whether the instance is locked. Valid values:

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

The version of the database engine.

RegionId String cn-hangzhou

The region ID of the instance.

VSwitchId String vsw-xxxxxxxxx

The vSwitch ID of the instance.

InstanceNetworkType String VPC

The network type of the instance. Valid values:

  • VPC
  • Classic
ZoneId String cn-hangzhou

The zone ID of the instance.

DBInstanceId String gp-xxxxxxxx

The ID of the instance.

Engine String gpdb

The database engine of the instance.

DBInstanceDescription String gp-xxxxxxxxxx

The description of the instance.

SegNodeNum String 4

The number of nodes.

StorageSize String 100

The supported storage size.

MasterNodeNum Integer 1

The number of coordinator nodes.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDBInstancesResponse>
    <TotalRecordCount>2</TotalRecordCount>
    <PageRecordCount>2</PageRecordCount>
    <RequestId>BBE00C04-A3E8-4114-881D-0480A72CB92E</RequestId>
    <PageNumber>1</PageNumber>
    <Items>
        <VpcId>vpc-xxxxxxxxxx</VpcId>
        <ExpireTime>2019-09-08T16:00:00Z</ExpireTime>
        <DBInstanceNetType>Internet</DBInstanceNetType>
        <InstanceDeployType>cluster</InstanceDeployType>
        <StorageType>cloud_essd</StorageType>
        <CreateTime>2019-09-08T16:00:00Z</CreateTime>
        <PayType>Prepaid</PayType>
        <Tags>
            <Key>key1</Key>
            <Value>value1</Value>
        </Tags>
        <LockReason>Unknow</LockReason>
        <DBInstanceStatus>Running</DBInstanceStatus>
        <ConnectionMode>Standard</ConnectionMode>
        <LockMode>Unlock</LockMode>
        <EngineVersion>4.3</EngineVersion>
        <RegionId>cn-hangzhou</RegionId>
        <VSwitchId>vsw-xxxxxxxxx</VSwitchId>
        <InstanceNetworkType>VPC</InstanceNetworkType>
        <ZoneId>cn-hangzhou</ZoneId>
        <DBInstanceId>gp-xxxxxxxx</DBInstanceId>
        <Engine>gpdb</Engine>
        <DBInstanceDescription>gp-xxxxxxxxxx</DBInstanceDescription>
        <SegNodeNum>4</SegNodeNum>
        <StorageSize>100</StorageSize>
        <MasterNodeNum>1</MasterNodeNum>
    </Items>
</DescribeDBInstancesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalRecordCount" : 2,
  "PageRecordCount" : 2,
  "RequestId" : "BBE00C04-A3E8-4114-881D-0480A72CB92E",
  "PageNumber" : 1,
  "Items" : [ {
    "VpcId" : "vpc-xxxxxxxxxx",
    "ExpireTime" : "2019-09-08T16:00:00Z",
    "DBInstanceNetType" : "Internet",
    "InstanceDeployType" : "cluster",
    "StorageType" : "cloud_essd",
    "CreateTime" : "2019-09-08T16:00:00Z",
    "PayType" : "Prepaid",
    "Tags" : [ {
      "Key" : "key1",
      "Value" : "value1"
    } ],
    "LockReason" : "Unknow",
    "DBInstanceStatus" : "Running",
    "ConnectionMode" : "Standard",
    "LockMode" : "Unlock",
    "EngineVersion" : "4.3",
    "RegionId" : "cn-hangzhou",
    "VSwitchId" : "vsw-xxxxxxxxx",
    "InstanceNetworkType" : "VPC",
    "ZoneId" : "cn-hangzhou",
    "DBInstanceId" : "gp-xxxxxxxx",
    "Engine" : "gpdb",
    "DBInstanceDescription" : "gp-xxxxxxxxxx",
    "SegNodeNum" : "4",
    "StorageSize" : "100",
    "MasterNodeNum" : 1
  } ]
}

Error codes

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