All Products
Search
Document Center

AnalyticDB for PostgreSQL:DescribeDBInstances

Last Updated:Mar 03, 2024

Queries a list of AnalyticDB for PostgreSQL instances.

Operation description

You can call this operation to query the instance types, network types, and states of AnalyticDB for PostgreSQL instances within a region.

Limits

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. As a result, your business may be affected. 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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
gpdb:DescribeDBInstancesRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

Note You can call the DescribeRegions operation to query the most recent region list.
cn-hangzhou
DBInstanceDescriptionstringNo

The description of the instance.

gp-bp12ga6v69h86****
InstanceNetworkTypestringNo

The network type of the instance. Valid values:

  • VPC: virtual private cloud (VPC).
  • Classic: classic network.
Note If you do not specify this parameter, instances of all network types are returned.
VPC
DBInstanceIdsstringNo

The instance ID. Separate multiple values with commas (,).

gp-bp12ga6v69h86****
PageSizeintegerNo

The number of entries per page. Valid values:

  • 30
  • 50
  • 100

Default value: 30.

50
PageNumberintegerNo

The page number. Pages start from page 1. Default value: 1.

1
Tagobject []No

The tag value.

KeystringNo

The key of tag N.

test-key
ValuestringNo

The value of tag N.

test-value
InstanceDeployTypesarrayNo

This parameter is no longer used.

stringNo

This parameter is no longer used.

null
DBInstanceStatusesarrayNo

The state of the instance.

stringNo

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

Note You must specify this parameter in lowercase letters.
running
DBInstanceCategoriesarrayNo

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

stringNo

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

  • basic: Basic Edition.
  • highavailability: High-availability Edition.
  • finance: Enterprise Edition.
basic,highavailability
DBInstanceModesarrayNo

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

stringNo

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

  • serverless: Serverless mode.
  • storageelastic: elastic storage mode.
  • classic: reserved storage mode.
storageelastic,serverless
ResourceGroupIdstringNo

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

rg-bp67acfmxazb4p****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalRecordCountinteger

The total number of entries returned.

1
PageRecordCountinteger

The number of entries per page.

1
RequestIdstring

The request ID.

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

The page number.

1
Itemsobject []

The queried instances.

VpcIdstring

The VPC ID.

vpc-bp19ame5m1r3oejns****
ExpireTimestring

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

Note The expiration time of a pay-as-you-go instance is 2999-09-08T16:00:00Z.
2999-09-08T16:00:00Z
DBInstanceNetTypestring

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

  • 0: Internet.
  • 1: internal network.
  • 2: VPC.
2
InstanceDeployTypestring

The resource type of the instance. Valid values:

  • cluster: Serverless mode or elastic storage mode.
  • replicaSet: reserved storage mode.
cluster
StorageTypestring

The storage type of the instance. Valid values:

  • cloud_essd: enhanced SSD (ESSD).
  • cloud_efficiency: ultra disk.
cloud_essd
CreateTimestring

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

2021-10-09T04:54:08Z
PayTypestring

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go.
  • Prepaid: subscription.
Postpaid
Tagsobject []

The tags that are added to the instance.

Keystring

The key of tag N.

test-key
Valuestring

The value of tag N.

test-value
LockReasonstring

The reason why the instance is locked. Valid values:

  • 0: The instance is not locked.
  • 1: The instance is manually locked.
  • 2: The instance is automatically locked due to instance expiration.
  • 3: The instance is automatically locked due to instance restoration.
  • 4: The instance is automatically locked due to exhausted storage.
Note If the instance is in reserved storage mode and unlocked, null is returned.
0
DBInstanceStatusstring

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

Running
ConnectionModestring

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.

null
LockModestring

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 due to instance expiration.
  • LockByRestoration: The instance is automatically locked due to instance restoration.
  • LockByDiskQuota: The instance is automatically locked due to exhausted storage.
  • LockReadInstanceByDiskQuota: The instance is a read-only instance and is automatically locked due to exhausted storage.
Unlock
EngineVersionstring

The version of the database engine.

6.0
RegionIdstring

The region ID.

cn-hangzhou
VSwitchIdstring

The vSwitch ID.

vsw-bp1cpq8mr64paltkb****
InstanceNetworkTypestring

The network type of the instance. Valid values:

  • Classic: classic network.
  • VPC: VPC.
VPC
ZoneIdstring

The zone ID.

cn-hangzhou-h
DBInstanceIdstring

The instance ID.

gp-bp12ga6v69h86****
Enginestring

The database engine of the instance.

gpdb
DBInstanceDescriptionstring

The description of the instance.

gp-bp12ga6v69h86****
SegNodeNumstring

The number of compute nodes.

4
StorageSizestring

The storage capacity of the instance. Unit: GB.

50
MasterNodeNuminteger

The number of coordinator nodes.

1
DBInstanceCategorystring

The edition of the instance. Valid values:

  • Basic: Basic Edition.
  • HighAvailability: High-availability Edition.
  • Finance: Enterprise Edition.
HighAvailability
DBInstanceModestring

The resource type of the instance. Valid values:

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

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

rg-bp67acfmxazb4p****
ServerlessModestring

The type of the Serverless mode. Valid values:

  • Manual: manual scheduling.
  • Auto: automatic scheduling.
Note This parameter is returned only for instances in Serverless mode.
Manual

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-04The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-12-11The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: VpcId