Queries the details of one or more AnalyticDB for PostgreSQL instances.
Description
You can call this operation to query the instance types, network types, and states of AnalyticDB for PostgreSQL instances within a specific 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
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-bp12ga6v69h86**** |
The description of the instance. |
InstanceNetworkType | String | No | VPC |
The network type of the instance. Valid values:
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:
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 | test-key |
The key of tag N. |
Tag.N.Value | String | No | test-value |
The value of tag N. |
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. Note The value of this parameter must be in lowercase.
|
DBInstanceCategories | Array of String | No | basic,highavailability |
The edition of the instance. Separate multiple values with commas (,). Valid values:
|
DBInstanceModes | Array of String | No | storageelastic,serverless |
The resource type of the instance. Separate multiple values with commas (,). Valid values:
|
ResourceGroupId | String | No | rg-bp67acfmxazb4p**** |
The ID of the resource group to which the instance belongs. |
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 page number of the returned page. |
Items | Array of DBInstance |
Details of the instance. |
|
DBInstance | |||
VpcId | String | vpc-bp******************* |
The ID of 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:
|
InstanceDeployType | String | cluster |
The resource type of the instance. Valid values:
|
StorageType | String | cloud_essd |
The storage type of the instance. Valid values:
|
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:
|
Tags | Array of Tag |
The tags of the instance. Each tag is a key-value pair. |
|
Tag | |||
Key | String | test-key |
The key of the tag. |
Value | String | test-value |
The value of the tag. |
LockReason | String | 0 |
The reason why the instance was locked. Valid values:
Note If the instance is in reserved storage mode and is not locked, null 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:
|
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:
|
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:
|
DBInstanceMode | String | StorageElastic |
The resource type of the instance. Valid values:
|
ResourceGroupId | String | rg-bp67acfmxazb4p**** |
The ID of the resource group to which the instance belongs. |
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.