Domain name for API request: postgres.tencentcloudapi.com.
This API is used to initialize a TencentDB for PostgreSQL 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
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. |
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. |
This example shows you how to initialize the instance whose ID is "postgres-6fego161".
https://postgres.tencentcloudapi.com/?Action=InitDBInstances
&DBInstanceIdSet.0=postgres-6fego161
&AdminName=testuser
&AdminPassword=testuser%40123
&Charset=UTF8
&<Common request parameters>
{
"Response": {
"RequestId": "98fe67de-f7a7-4285-b1f2-40c2a2a3495e",
"DBInstanceIdSet": [
"postgres-6fego161"
]
}
}
This example shows you how to simultaneously initialize two instances whose IDs are "postgres-6fego161" and "postgres-lnp6j617" respectively.
https://postgres.tencentcloudapi.com/?Action=InitDBInstances
&DBInstanceIdSet.0=postgres-6fego161
&DBInstanceIdSet.1=postgres-lnp6j617
&AdminName=testuser
&AdminPassword=testuser%40123
&Charset=UTF8
&<Common request parameters>
{
"Response": {
"RequestId": "5b895b34-5448-4c55-9ad1-a61427c15837",
"DBInstanceIdSet": [
"postgres-6fego161",
"postgres-lnp6j617"
]
}
}
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.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 at least two of the following types: letters, digits, and symbols (_+-&=!@#$%^*()). |
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. |
Was this page helpful?