Domain name for API request: postgres.intl.tencentcloudapi.com.
This API is used to query the details of one or more instances.
A maximum of 1000 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: DescribeDBInstances. |
| Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| Filters.N | No | Array of Filter | Query using one or more filter criteria. filter criteria currently supported include:. db-instance-id: Filter by instance ID, type string db-instance-name: specifies the instance name to filter by, supports fuzzy matching (string type). db-project-id: Filter by project ID, type integer db-pay-mode: filter by instance billing mode (prepaid - prepayment; postpaid - postpayment). string type. db-tag-key: specifies the tag key to filter by (string type). db-private-ip: Filter by instance Private Cloud IP, type string db-public-address: filter by instance public network address (in string format) db-dedicated-cluster-id: Filter by private cluster Id, type string |
| Limit | No | Integer | Number of results displayed per page. value range: 0-100. input 0 to use the default configuration. default is 10. |
| Offset | No | Integer | Data offset, which starts from 0. |
| OrderBy | No | String | Specifies the sorting index, such as instance Name and creation time. supports DBInstanceId, CreateTime, Name, and EndTime. default value: CreateTime. |
| OrderByType | No | String | Sorting method, including ascending: asc and descending: desc. the default value is asc. |
| Parameter Name | Type | Description |
|---|---|---|
| TotalCount | Integer | Number of instances found. |
| DBInstanceSet | Array of DBInstance | Instance details set. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to query the instance list by specified paging
POST / HTTP/1.1
Host: postgres.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDBInstances
<Common request parameters>
{
"Limit": 10,
"Offset": 0
}
{
"Response": {
"DBInstanceSet": [
{
"AppId": 2512400000,
"AutoRenew": 0,
"CreateTime": "2024-09-01 16:00:45",
"DBCharset": "UTF8",
"DBEngine": "postgresql",
"DBEngineConfig": "",
"DBInstanceClass": "pg.it.small2",
"DBInstanceCpu": 1,
"DBInstanceId": "postgres-dnlizio3",
"DBInstanceMemory": 2,
"DBInstanceName": "Unnamed",
"DBInstanceNetInfo": [
{
"Address": "",
"Ip": "10.*.*.*",
"NetType": "private",
"Port": 5432,
"ProtocolType": "postgresql",
"Status": "opened",
"SubnetId": "subnet-b23o6b22",
"VpcId": "vpc-49ab5lb9"
},
{
"Address": "",
"Ip": "",
"NetType": "public",
"Port": 0,
"ProtocolType": "",
"Status": "initing",
"SubnetId": "",
"VpcId": ""
}
],
"DBInstanceStatus": "running",
"DBInstanceStorage": 100,
"DBInstanceType": "primary",
"DBInstanceVersion": "standard",
"DBKernelVersion": "v16.2_r1.5",
"DBMajorVersion": "16",
"DBNodeSet": [
{
"DedicatedClusterId": "",
"Role": "Primary",
"Zone": "ap-guangzhou-7"
},
{
"DedicatedClusterId": "",
"Role": "Standby",
"Zone": "ap-guangzhou-7"
}
],
"DBVersion": "16.2",
"ExpireTime": "0000-00-00 00:00:00",
"IsSupportTDE": 0,
"IsolatedTime": "0000-00-00 00:00:00",
"MasterDBInstanceId": "",
"NetworkAccessList": null,
"OfflineTime": "0001-01-04 00:00:00",
"PayType": "postpaid",
"ProjectId": 0,
"ReadOnlyInstanceNum": 0,
"Region": "ap-guangzhou",
"StatusInReadonlyGroup": "",
"SubnetId": "subnet-b23o6b22",
"SupportIpv6": 0,
"TagList": [],
"Type": "",
"Uid": 421842,
"UpdateTime": "2024-09-29 10:10:57",
"VpcId": "vpc-49ab5lb9",
"Zone": "ap-guangzhou-7"
}
],
"RequestId": "9e87cd50-5daf-44bf-8f67-3d3f017a87e7",
"TotalCount": 1
}
}
This example shows you how to query, for example, the details of the instance with the ID postgres-xxxxx.
POST / HTTP/1.1
Host: postgres.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDBInstances
<Common request parameters>
{
"Limit": 10,
"Filters": [
{
"Values": [
"postgres-dnlizio3"
],
"Name": "db-instance-id"
}
],
"Offset": 0
}
{
"Response": {
"DBInstanceSet": [
{
"AppId": 2512400000,
"AutoRenew": 0,
"CreateTime": "2024-09-01 16:00:45",
"DBCharset": "UTF8",
"DBEngine": "postgresql",
"DBEngineConfig": "",
"DBInstanceClass": "pg.it.small2",
"DBInstanceCpu": 1,
"DBInstanceId": "postgres-dnlizio3",
"DBInstanceMemory": 2,
"DBInstanceName": "Unnamed",
"DBInstanceNetInfo": [
{
"Address": "",
"Ip": "10.*.*.*",
"NetType": "private",
"Port": 5432,
"ProtocolType": "postgresql",
"Status": "opened",
"SubnetId": "subnet-b23o6b22",
"VpcId": "vpc-49ab5lb9"
},
{
"Address": "",
"Ip": "",
"NetType": "public",
"Port": 0,
"ProtocolType": "",
"Status": "initing",
"SubnetId": "",
"VpcId": ""
}
],
"DBInstanceStatus": "running",
"DBInstanceStorage": 100,
"DBInstanceType": "primary",
"DBInstanceVersion": "standard",
"DBKernelVersion": "v16.2_r1.5",
"DBMajorVersion": "16",
"DBNodeSet": [
{
"DedicatedClusterId": "",
"Role": "Primary",
"Zone": "ap-guangzhou-7"
},
{
"DedicatedClusterId": "",
"Role": "Standby",
"Zone": "ap-guangzhou-7"
}
],
"DBVersion": "16.2",
"ExpireTime": "0000-00-00 00:00:00",
"IsSupportTDE": 0,
"IsolatedTime": "0000-00-00 00:00:00",
"MasterDBInstanceId": "",
"NetworkAccessList": null,
"OfflineTime": "0001-01-04 00:00:00",
"PayType": "postpaid",
"ProjectId": 0,
"ReadOnlyInstanceNum": 0,
"Region": "ap-guangzhou",
"StatusInReadonlyGroup": "",
"SubnetId": "subnet-b23o6b22",
"SupportIpv6": 0,
"TagList": [],
"Type": "",
"Uid": 421842,
"UpdateTime": "2024-09-29 10:10:57",
"VpcId": "vpc-49ab5lb9",
"Zone": "ap-guangzhou-7"
}
],
"RequestId": "9e87cd50-5daf-44bf-8f67-3d3f017a87e7",
"TotalCount": 1
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure.UnauthorizedOperation | Authentication failed. |
| FailedOperation.CamCheckResourceError | Failed to get permissions. Please try again later. If the problem persists, please contact customer service. |
| FailedOperation.CamCheckResourceFailed | Failed to check resource permissions through CAM. |
| FailedOperation.CamSigAndAuthError | Authentication failed. Please try again later. If the problem persists, please contact customer service. |
| FailedOperation.DatabaseAccessError | Failed to access database management service. Please try again later. If the problem persists, please contact customer service. |
| FailedOperation.DatabaseAffectedError | Data operation failed. Please contact customer service. |
| FailedOperation.FailedOperationError | Operation failed. Please try again later. |
| FailedOperation.LimitOperation | Operations are not allowed on the instance. |
| FailedOperation.OssAccessError | Failed to access database management service. Please try again later. If the problem persists, please contact customer service. |
| InternalError.DBError | Backend database execution error. |
| InternalError.InternalHttpServerError | An exception occurred while executing the request. |
| InternalError.SystemError | System error. When this error occurs, please contact customer service for assistance. |
| InternalError.TransactioBeginError | Failed to enable transactions |
| InternalError.UnknownError | Unknown error. When this error occurs, please contact customer service for assistance. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue.DataConvertError | Failed to convert data format. Please contact customer service. |
| InvalidParameterValue.IllegalRegion | Invalid Region parameter. |
| InvalidParameterValue.InstanceNotExist | The current instance does not exist. |
| InvalidParameterValue.InvalidParameterValueError | Incorrect parameter value |
| InvalidParameterValue.InvalidRegionIdError | Invalid region |
| InvalidParameterValue.ParameterHandleError | Failed to process the parameter. Please check if the parameter value is valid. |
| InvalidParameterValue.RegionNotSupported | The current region is not supported. |
| InvalidParameterValue.StructParseFailed | An error occurred while parsing parameters. |
| OperationDenied.CamDeniedError | This operation cannot be performed. |
| ResourceNotFound.InstanceNotFoundError | The instance does not exist. |
| ResourceUnavailable.InvalidInstanceStatus | Incorrect instance status. |
| UnsupportedOperation | The operation is not supported. |
피드백