ResetAccountPassword

Last updated: 2020-12-01 20:30:30

1. API Description

Domain name for API request: postgres.tencentcloudapi.com.

This API is used to reset the account password of an instance.

A maximum of 20 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: postgres.ap-shanghai-fsi.tencentcloudapi.com

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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 parameter. The value used for this API: ResetAccountPassword.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
DBInstanceId Yes String Instance ID in the format of postgres-4wdeb0zv
UserName Yes String Instance account name
Password Yes String New password corresponding to UserName account

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Resetting the account password for the "postgres-lnp6j6172" instance (failure)

Input Example

https://postgres.tencentcloudapi.com/?Action=ResetAccountPassword
&DBInstanceId=postgres-lnp6j6172
&UserName=test
&Password=1234qwer()
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "08fdf411-5d39-44f2-8e1d-a58ee60b237d",
    "Error": {
      "Message": "admin unmatch|oss return failed, code:3, message:admin unmatch",
      "Code": "FailedOperation.OssOperationFailed"
    }
  }
}

Example2 Resetting the account password for the "postgres-lnp6j6172" instance (success)

Input Example

https://postgres.tencentcloudapi.com/?Action=ResetAccountPassword
&DBInstanceId=postgres-lnp6j6172
&UserName=test
&Password=1234qwer()
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "08fdf411-5d39-44f2-8e1d-a58ee60b237d"
  }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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.OssOperationFailed Failed to request the backend API.
InternalError.DBError Backend database execution error.
InternalError.SystemError System error. When this error occurs, please contact customer service for assistance.
InvalidAccountPassword Incorrect account password.
InvalidParameter Parameter error.
InvalidParameterValue.AccountNotExist The current account does not exist.
InvalidParameterValue.InstanceNotExist The current instance does not exist.
InvalidParameterValue.InvalidPasswordFormat Incorrect password format.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help