Last updated: 2021-11-16 17:22:36

1. API Description

Domain name for API request:

This API is used to initialize a TencentDB for PostgreSQL instance.

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

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: InitDBInstances.
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.
DBInstanceIdSet.N Yes Array of String Instance ID set.
AdminName Yes String Instance admin account username.
AdminPassword Yes String Password corresponding to instance root account username.
Charset Yes String Instance character set. Valid values: UTF8, LATIN1.

3. Output Parameters

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

4. Example

Example1 Initializing single instance

This example shows you how to initialize the instance whose ID is "postgres-6fego161".

Input Example
&<Common request parameters>

Output Example

  "Response": {
    "RequestId": "98fe67de-f7a7-4285-b1f2-40c2a2a3495e",
    "DBInstanceIdSet": [

Example2 Initializing multiple instances

This example shows you how to simultaneously initialize two instances whose IDs are "postgres-6fego161" and "postgres-lnp6j617" respectively.

Input Example
&<Common request parameters>

Output Example

  "Response": {
    "RequestId": "5b895b34-5448-4c55-9ad1-a61427c15837",
    "DBInstanceIdSet": [

5. Developer Resources


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.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.FailedOperationError Operation failed. Please try again later.
FailedOperation.FlowCreateError Failed to create a task. Please try again later. If the problem persists, please contact customer service.
InternalError.DBError Backend database execution error.
InternalError.SystemError System error. When this error occurs, please contact customer service for assistance.
InvalidParameter Parameter error.
InvalidParameter.ParameterCheckError Failed to check the parameter.
InvalidParameterValue.CharsetNotFoundError Incorrect database character set
InvalidParameterValue.InstanceNotExist The current instance does not exist.
InvalidParameterValue.InvalidAccountError Invalid account. The account name is case-insensitive, must contain 1-16 characters comprised of letters, digits, underscores, and should neither be "postgres" nor start with a digit or "pg_".
InvalidParameterValue.InvalidAccountFormat Incorrect account format.
InvalidParameterValue.InvalidCharset Incorrect database character set. Currently, only UTF8 and LATIN1 are supported.
InvalidParameterValue.InvalidParameterValueError Incorrect parameter value
InvalidParameterValue.InvalidPasswordFormat Incorrect password format.
InvalidParameterValue.InvalidPasswordLengthError Invalid password. The password length does not meet the requirements.
InvalidParameterValue.InvalidPasswordValueError Invalid password. The password must contain uppercase letters, lowercase letters, digits, and symbols (()`~!@#$%^&*-+=_|{}[]:;'<>,.?/), and cannot start with a slash (/).
InvalidParameterValue.ParameterCharacterLimitError The parameter is invalid. Please modify it and try again.
InvalidParameterValue.ParameterCharacterPreLimitError The parameter prefix is invalid. Please modify it and try again.
InvalidParameterValue.ParameterHandleError Failed to process the parameter. Please check if the parameter value is valid.
OperationDenied.CamDeniedError This operation cannot be performed.
OperationDenied.InstanceAccessDeniedError You do not have the permission to operate this resource.
OperationDenied.InstanceStatusLimitOpError This operation cannot be performed on an instance in this status.
ResourceNotFound.InstanceNotFoundError The instance does not exist.
ResourceUnavailable.InvalidInstanceStatus Incorrect instance status.