All Products
Search
Document Center

AnalyticDB:DescribeDBInstances

Last Updated:Mar 30, 2026

Lists AnalyticDB for PostgreSQL instances.

Operation description

Usage

This API retrieves details for AnalyticDB for PostgreSQL instances in a specified region, such as instance type, network type, and instance status.

QPS limit

The default QPS limit for this API is 1,000 requests per second per user. Calls exceeding this limit are throttled, which can impact your business. Plan your API calls accordingly.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

gpdb:DescribeDBInstances

get

*DBInstance

acs:gpdb:{#regionId}:{#accountId}:dbinstance/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the instance.

Note

You can call the DescribeRegions operation to query the available region IDs.

cn-hangzhou

DBInstanceDescription

string

No

The instance description.

gp-bp12ga6v69h86****

InstanceNetworkType

string

No

The instance network type. Valid values:

  • VPC: VPC

  • Classic: classic network

Note

If you omit this parameter, the operation returns instances of all network types.

VPC

DBInstanceIds

string

No

The instance IDs. Separate multiple IDs with commas (,).

gp-bp12ga6v69h86****

PageSize

integer

No

The number of entries to return on each page. Valid values:

  • 30

  • 50

  • 100

Default value: 30.

50

PageNumber

integer

No

The page number. The value must be an integer that is greater than 0. Default value: 1.

1

Tag

array<object>

No

The tags of the instance.

object

No

The tags of the instance.

Key

string

No

The key of the tag.

test-key

Value

string

No

The value of the tag.

test-value

InstanceDeployTypes

array

No

This parameter is deprecated. Do not specify this parameter.

string

No

This parameter is deprecated. Do not specify this parameter.

null

DBInstanceStatuses

array

No

The state of the instance.

string

No

The state of the instance. You can specify multiple states. Separate multiple states with a comma (,). For more information, see Instance states.

Note

The value of this parameter must be in lowercase.

running

DBInstanceCategories

array

No

The instance edition. You can specify multiple editions. Separate multiple editions with a comma (,).

string

No

The instance edition. You can specify multiple editions. Separate multiple editions with a comma (,). Valid values:

  • basic: Basic Edition.

  • highavailability: High-availability Edition.

  • finance: Enterprise Edition.

basic,highavailability

DBInstanceModes

array

No

The resource type of the instance. You can specify multiple resource types. Separate multiple resource types with a comma (,).

string

No

The resource type of the instance. You can specify multiple resource types. Separate multiple resource types with a comma (,). Valid values:

  • serverless: Serverless.

  • storageelastic: elastic storage mode.

  • classic: reserved storage mode.

storageelastic,serverless

ResourceGroupId

string

No

The ID of the resource group to which the instance belongs.

rg-bp67acfmxazb4p****

VpcId

string

No

The VPC ID. You can specify this parameter to query instances in a VPC.

vpc-t4nqyp3tc5mx7vy6****

Response elements

Element

Type

Description

Example

object

The returned data.

Items

object

A collection of instances.

DBInstance

array<object>

A list of instance details.

array<object>

The details of an instance.

ConnectionMode

string

This parameter is deprecated and not returned.

To query the access mode, call the DescribeDBInstanceAttribute operation.

null

CreateTime

string

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

2021-10-09T04:54:08Z

DBInstanceCategory

string

The instance edition. Valid values:

  • Basic: Basic Edition.

  • HighAvailability: High-availability Edition.

  • Finance: Enterprise Edition.

HighAvailability

DBInstanceDescription

string

The instance description.

gp-bp12ga6v69h86****

DBInstanceId

string

The instance ID.

gp-bp12ga6v69h86****

DBInstanceMode

string

The instance mode. Valid values:

  • Serverless: Serverless.

  • StorageElastic: storage-elastic mode.

  • Classic: storage-reserved mode.

StorageElastic

DBInstanceNetType

string

The network interface type of the instance. Valid values:

  • 0: Internet.

  • 1: internal network.

  • 2: VPC.

2

DBInstanceStatus

string

The instance status. For more information, see Instance status table.

Running

Engine

string

The database engine.

gpdb

EngineVersion

string

The database engine version.

6.0

ExpireTime

string

The time when the instance expires. The time is in UTC.

Note

For pay-as-you-go instances, the expiration time is 2999-09-08T16:00:00Z.

2999-09-08T16:00:00Z

InstanceDeployType

string

The deployment type of the instance. Valid values:

  • cluster: storage-elastic mode or Serverless.

  • replicaSet: storage-reserved mode.

cluster

InstanceNetworkType

string

The network type of the instance. Valid values:

  • Classic: classic network.

  • VPC: VPC.

VPC

LockMode

string

The lock mode of the instance. 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 it is rolled back.

  • LockByDiskQuota: The instance is automatically locked when its storage space is full.

  • LockReadInstanceByDiskQuota: The read-only instance is automatically locked when its storage space is full.

Unlock

LockReason

string

The reason that the instance is locked. Valid values:

  • 0: The instance is running as normal.

  • 1: The instance is manually locked.

  • 2: The instance is automatically locked after it expires.

  • 3: The instance is automatically locked before it is rolled back.

  • 4: The instance is automatically locked when its storage space is full.

Note

For instances in storage-reserved mode, this parameter returns an empty string if the instance is not locked.

0

MasterNodeNum

integer

The number of coordinator nodes.

1

PayType

string

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go.

  • Prepaid: subscription.

Postpaid

ProdType

string

The product type. Valid values:

  • standard: Standard.

  • cost-effective: Cost-effective.

standard

RegionId

string

The region ID.

cn-hangzhou

ResourceGroupId

string

The ID of the resource group to which the instance belongs.

rg-bp67acfmxazb4p****

SegNodeNum

string

The number of segment nodes.

4

ServerlessMode

string

The mode of the Serverless instance. Valid values:

  • Manual: Manual scheduling.

  • Auto: Automatic scheduling.

Note
  • This parameter is returned only for Serverless instances.

  • The automatic scheduling feature for AnalyticDB for PostgreSQL Serverless is in invitation-only preview. To use this feature, you can submit a ticket to request access.

Manual

StorageSize

string

The storage capacity of the instance, in GB.

50

StorageType

string

The storage type of the instance. Valid values:

  • cloud_essd: ESSD.

  • cloud_efficiency: Ultra Disk.

cloud_essd

Tags

object

The tags attached to the instance.

Tag

array<object>

An array of tags.

object

Tag details.

Key

string

The tag key.

test-key

Value

string

The tag value.

test-value

VSwitchId

string

The vSwitch ID.

vsw-bp1cpq8mr64paltkb****

VpcId

string

The VPC ID.

vpc-bp19ame5m1r3oejns****

ZoneId

string

The zone ID.

cn-hangzhou-h

PageNumber

integer

The page number.

1

PageRecordCount

integer

The number of entries returned on the current page.

1

RequestId

string

The request ID.

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

TotalRecordCount

integer

The total number of entries.

1

Examples

Success response

JSON format

{
  "Items": {
    "DBInstance": [
      {
        "ConnectionMode": "null",
        "CreateTime": "2021-10-09T04:54:08Z",
        "DBInstanceCategory": "HighAvailability",
        "DBInstanceDescription": "gp-bp12ga6v69h86****",
        "DBInstanceId": "gp-bp12ga6v69h86****",
        "DBInstanceMode": "StorageElastic",
        "DBInstanceNetType": "2",
        "DBInstanceStatus": "Running",
        "Engine": "gpdb",
        "EngineVersion": "6.0",
        "ExpireTime": "2999-09-08T16:00:00Z",
        "InstanceDeployType": "cluster",
        "InstanceNetworkType": "VPC",
        "LockMode": "Unlock",
        "LockReason": "0",
        "MasterNodeNum": 1,
        "PayType": "Postpaid",
        "ProdType": "standard",
        "RegionId": "cn-hangzhou",
        "ResourceGroupId": "rg-bp67acfmxazb4p****",
        "SegNodeNum": "4",
        "ServerlessMode": "Manual",
        "StorageSize": "50",
        "StorageType": "cloud_essd",
        "Tags": {
          "Tag": [
            {
              "Key": "test-key",
              "Value": "test-value"
            }
          ]
        },
        "VSwitchId": "vsw-bp1cpq8mr64paltkb****",
        "VpcId": "vpc-bp19ame5m1r3oejns****",
        "ZoneId": "cn-hangzhou-h"
      }
    ]
  },
  "PageNumber": 1,
  "PageRecordCount": 1,
  "RequestId": "53EA07B7-FC2A-521B-AB7C-27**********",
  "TotalRecordCount": 1
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.