Domain name for API request: postgres.intl.tencentcloudapi.com.
This API is used to query the list of the database accounts for an instance.
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: DescribeAccounts. |
| 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. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo. |
| DBInstanceId | Yes | String | Instance ID, such as postgres-6fego161. can be obtained through the DescribeDBInstances api (https://www.tencentcloud.com/document/product/409/16773?lang=en). |
| Limit | No | Integer | Pagination return. maximum return per page. default 20. value range 1-100. |
| Offset | No | Integer | Data offset, which starts from 0. |
| OrderBy | No | String | Return data is sorted by creation time or username. valid values: createTime, name, updateTime. createTime - sort by creation time; name - sort by username; updateTime - sort by update time. Default value: createTime. |
| OrderByType | No | String | Specifies whether the returned results are in ascending or descending order. valid values: desc or asc. desc - descending order; asc - ascending order. Default value: desc. |
| Parameter Name | Type | Description |
|---|---|---|
| TotalCount | Integer | Number of date entries returned for this API call. |
| Details | Array of AccountInfo | Detailed account list information. when the CreateTime field is 0000-00-00 00:00:00, it means the corresponding account is created by direct connection database, not through the CreateAccount api. |
| 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 get the account list of the instance postgres-hpe52jnz.
POST / HTTP/1.1
Host: postgres.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAccounts
<Common request parameters>
{
"DBInstanceId": "postgres-hpe52jnz"
}
{
"Response": {
"Details": [
{
"CreateTime": "2024-05-06 21:00:12",
"DBInstanceId": "postgres-hpe52jnz",
"Remark": "",
"Status": 2,
"UpdateTime": "2024-06-06 21:00:12",
"UserName": "app_user",
"UserType": "tencentDBSuper"
}
],
"RequestId": "1299fe3a-9958-440a-bfd0-e4eb1e71b7eb",
"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. |
| DBError | Backend database execution error. |
| 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.PreCheckError | Pre-check failed |
| 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. |
| InvalidParameter.ParameterCheckError | Failed to check the parameter. |
| InvalidParameterValue.AccountNotExist | The current account does not exist. |
| InvalidParameterValue.InstanceNotExist | The current instance does not exist. |
| InvalidParameterValue.InvalidParameterValueError | Incorrect parameter value |
| InvalidParameterValue.ParameterHandleError | Failed to process the parameter. Please check if the parameter value is valid. |
| OperationDenied.CamDeniedError | This operation cannot be performed. |
| ResourceNotFound.InstanceNotFoundError | The instance does not exist. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback