Queries the list of AnalyticDB for PostgreSQL instances.

Description

This operation is called to query the instance types, network types, and states of AnalyticDB for PostgreSQL instances within a specific region.

Limit

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered and may affect your business. We recommend that you take note of the limit when you call this operation.

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.

Note You can call the DescribeRegions operation to query the most recent region list.
DBInstanceDescription String No gp-bp***************

The description of the instance.

InstanceNetworkType String No VPC

The network type of the instance. Valid values:

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

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
  • 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.

InstanceDeployTypes Array of String No null

This parameter is no longer used.

DBInstanceStatuses Array of String No running

The state of the instance. Separate multiple values with commas (,). For more information, see Instance statuses.

DBInstanceCategories Array of String No basic,highavailability

The edition of the instance. Separate multiple values with commas (,). Valid values:

  • basic: Basic Edition
  • highavailability: High-availability Edition
  • finance: Enterprise Edition
DBInstanceModes Array of String No storageelastic,serverless

The resource type of the instance. Separate multiple values with commas (,). Valid values:

  • serverless: Serverless mode
  • storageelastic: elastic storage mode
  • classic: reserved storage mode
Tag.N.Key String No test-key

The key of tag N.

Tag.N.Value String No test-value

The value of tag N.

Response parameters

Parameter Type Example Description
TotalRecordCount Integer 1

The total number of entries returned.

PageRecordCount Integer 1

The number of entries returned on the current page.

RequestId String 53EA07B7-FC2A-521B-AB7C-27**********

The ID of the request.

PageNumber Integer 1

The number of the returned page.

Items Array of DBInstance

Details of the instances.

DBInstance
VpcId String vpc-bp*******************

The ID of the virtual private cloud (VPC).

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

The expiration time of the instance. The time is displayed in UTC.

Note For pay-as-you-go instances, 2999-09-08T16:00:00Z is returned.
DBInstanceNetType String 2

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

  • 0: Internet
  • 1: internal network
  • 2: VPC
InstanceDeployType String cluster

The resource type of the instance. Valid values:

  • cluster: elastic storage mode or Serverless mode
  • replicaSet: reserved storage mode
StorageType String cloud_essd

The storage type of the instance. Valid values:

  • cloud_essd: enhanced SSD (ESSD)
  • cloud_efficiency: ultra disk
CreateTime String 2021-10-09T04:54:08Z

The time when the instance was created. The time is displayed in UTC.

PayType String Postpaid

The billing method of the instance. Valid values:

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

The tags of the instance. Each tag is a key-value pair.

Tag
Key String test-key

The tag key of the instance.

Value String test-value

The tag valueof the instance.

LockReason String 0

The reason why the instance was locked. Valid values:

  • 0: The instance is not locked.
  • 1: The instance was manually locked.
  • 2: The instance was automatically locked due to instance expiration.
  • 3: The instance was automatically locked before a rollback.
  • 4: The instance was automatically locked when the disk space is full.
Note If the instance is in reserved storage mode and unlocked, no value is returned.
DBInstanceStatus String Running

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

ConnectionMode String null

An invalid parameter. It is no longer returned when you call this operation.

You can call the DescribeDBInstanceAttribute operation to query the access mode of an instance.

LockMode String Unlock

The lock mode of the instance. Valid values:

  • Unlock: The instance is not locked.
  • ManualLock: The instance was manually locked.
  • LockByExpiration: The instance was automatically locked due to instance expiration.
  • LockByRestoration: The instance was automatically locked before a rollback.
  • LockByDiskQuota: The instance was automatically locked when the disk space is full.
  • LockReadInstanceByDiskQuota: The instance is a read-only instance that is automatically locked when the disk space is full.
EngineVersion String 6.0

The version of the database engine.

RegionId String cn-hangzhou

The region ID of the instance.

VSwitchId String vsw-bp*******************

The ID of the vSwitch.

InstanceNetworkType String VPC

The network type of the instance. Valid values:

  • Classic
  • VPC
ZoneId String cn-hangzhou-h

The zone ID of the instance.

DBInstanceId String gp-bp***************

The ID of the instance.

Engine String gpdb

The database engine of the instance.

DBInstanceDescription String gp-bp***************

The description of the instance.

SegNodeNum String 4

The number of compute nodes.

StorageSize String 50

The storage capacity. Unit: GB.

MasterNodeNum Integer 1

The number of coordinator nodes.

DBInstanceCategory String HighAvailability

The edition of the instance. Valid values:

  • Basic: Basic Edition
  • HighAvailability: High-availability Edition
  • Finance: Enterprise Edition
DBInstanceMode String StorageElastic

The resource type of the instance. Valid values:

  • Serverless: Serverless mode
  • StorageElastic: elastic storage mode
  • Classic: reserved storage mode

Examples

Sample requests

http(s)://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>
    <code>200</code>
    <data>
        <TotalRecordCount>1</TotalRecordCount>
        <PageRecordCount>1</PageRecordCount>
        <RequestId>53EA07B7-FC2A-521B-AB7C-27**********</RequestId>
        <PageNumber>1</PageNumber>
        <Items>
            <DBInstance>
                <MasterNodeNum>1</MasterNodeNum>
                <StorageType>cloud_essd</StorageType>
                <EngineVersion>6.0</EngineVersion>
                <DBInstanceStatus>Running</DBInstanceStatus>
                <ZoneId>cn-hangzhou-h</ZoneId>
                <DBInstanceNetType>2</DBInstanceNetType>
                <CreateTime>2021-10-09T04:54:08Z</CreateTime>
                <VSwitchId>vsw-bp*******************</VSwitchId>
                <SegNodeNum>4</SegNodeNum>
                <StorageSize>50</StorageSize>
                <PayType>Postpaid</PayType>
                <LockMode>Unlock</LockMode>
                <InstanceNetworkType>VPC</InstanceNetworkType>
                <DBInstanceCategory>HighAvailability</DBInstanceCategory>
                <VpcId>vpc-bp*******************</VpcId>
                <DBInstanceId>gp-bp***************</DBInstanceId>
                <DBInstanceMode>StorageElastic</DBInstanceMode>
                <InstanceDeployType>cluster</InstanceDeployType>
                <RegionId>cn-hangzhou</RegionId>
                <ExpireTime>2999-09-08T16:00:00Z</ExpireTime>
                <LockReason>0</LockReason>
                <Engine>gpdb</Engine>
                <DBInstanceDescription>gp-bp***************</DBInstanceDescription>
                <Tags>
                    <Tag>
                        <Value>test-value</Value>
                        <Key>test-key</Key>
                    </Tag>
                </Tags>
            </DBInstance>
        </Items>
    </data>
    <requestId>1439F852-06E3-1238-8BC6-F74CABD28D5D</requestId>
</DescribeDBInstancesResponse>

JSON format

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

{
  "code" : 200,
  "data" : {
    "TotalRecordCount" : 1,
    "PageRecordCount" : 1,
    "RequestId" : "53EA07B7-FC2A-521B-AB7C-27**********",
    "PageNumber" : 1,
    "Items" : {
      "DBInstance" : {
        "MasterNodeNum" : 1,
        "StorageType" : "cloud_essd",
        "EngineVersion" : 6,
        "DBInstanceStatus" : "Running",
        "ZoneId" : "cn-hangzhou-h",
        "DBInstanceNetType" : 2,
        "CreateTime" : "2021-10-09T04:54:08Z",
        "VSwitchId" : "vsw-bp*******************",
        "SegNodeNum" : 4,
        "StorageSize" : 50,
        "PayType" : "Postpaid",
        "LockMode" : "Unlock",
        "InstanceNetworkType" : "VPC",
        "DBInstanceCategory" : "HighAvailability",
        "VpcId" : "vpc-bp*******************",
        "DBInstanceId" : "gp-bp***************",
        "DBInstanceMode" : "StorageElastic",
        "InstanceDeployType" : "cluster",
        "RegionId" : "cn-hangzhou",
        "ExpireTime" : "2999-09-08T16:00:00Z",
        "LockReason" : 0,
        "Engine" : "gpdb",
        "DBInstanceDescription" : "gp-bp***************",
        "Tags" : {
          "Tag" : {
            "Value" : "test-value",
            "Key" : "test-key"
          }
        }
      }
    }
  },
  "requestId" : "1439F852-06E3-1238-8BC6-F74CABD28D5D"
}

Error codes

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