Add PostgreSQL Cluster Instance
Select
This operation adds PostgreSQL Cluster Instance for a Cluster client. Please make sure that a PostgreSQL cluster client with the same name as instance is already created.
- application/json
Request Body
instanceProperties object
instance object
instanceName string requiredInstance Name
applicationId integer requiredDefault value:
125
PostgreSQL app ID
clientName string requiredCluster client Name under which instance needs to be created
planEntity object
planName string requiredPlan Name
postGreSQLInstance object
standbyOptions object
useMasterForDataBkp boolean requiredDefault value:
true
Flag to determine if master can be used for data backup if all the standby nodes are down.
useMasterForLogBkp boolean requiredDefault value:
false
Flag to specify whether log backups should always occur on the master node.
nodes object[]
physicalClient object
clientName string requiredCluster node name
postgresProps object
ArchiveLogDirectory stringArchive log directory path
BinaryDirectory string requiredPostgreSQL binary Directory
DBRole integer requiredDefault value:
3
Database role:
Master: 1, Standby: 2, Unknown: 3
LibDirectory string requiredPostgreSQL library Directory
MaintainenceDB string requiredMaintainence Database for connection
managerBinDir stringCluster manager binary directory
managerConfig stringCluster manager config file path
port string requiredDatabase port
SAUser object
userName string requiredDatabase user
password string requiredDatabase password encoded in Base64
clusterPriority integer requiredThe priority level of the cluster node. Each node in the cluster instance must have a unique priority, starting with 0 as the highest priority.
dbClusterManager integer requiredPossible values:
>= 1
and<= 4
PostgreSQL cluster manager type. 1=Patroni cluster 2=EDB Failover Manager 3=Repmgr for Postgres 4=Native Replication
- 200
- 400
- 401
- 409
- 500
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
processinginstructioninfo object
attributes object[]
name stringvalue stringresponse object
warningCode integererrorCode integerwarningMessage stringentity object
subclientId integerclientId integerinstanceName stringCreated cluster instance Name
instanceId integerInstance ID
_type_ integer
{
"processinginstructioninfo": {
"attributes": [
{
"name": "string",
"value": "string"
}
]
},
"response": {
"warningCode": 0,
"errorCode": 0,
"warningMessage": "string",
"entity": {
"subclientId": 0,
"clientId": 0,
"instanceName": "string",
"instanceId": 0,
"_type_": 0
}
}
}
{
"processinginstructioninfo": {
"attributes": [
{
"name": "exitval",
"value": "0"
}
]
},
"response": {
"warningCode": 0,
"errorCode": 0,
"warningMessage": "",
"entity": {
"subclientId": 0,
"clientId": 1705,
"instanceName": "GK_PATRONI",
"instanceId": 6670,
"_type_": 0
}
}
}
Bad Request
Response Headers
- application/json
- Schema
- Example
Schema
- string
Request body is empty or format is invalid
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
- errorMessage string
- errorCode integer
{
"errorMessage": "string",
"errorCode": 0
}
{
"errorMessage": "Access Denied",
"errorCode": 5
}
Conflict
- application/json
- Schema
- Example (from schema)
- Conflicting instance
Schema
- errorMessage string
- errorCode integer
entity object
subclientId integerclientId integerinstanceName stringinstanceId integer_type_ integer
{
"errorMessage": "string",
"errorCode": 0,
"entity": {
"subclientId": 0,
"clientId": 0,
"instanceName": "string",
"instanceId": 0,
"_type_": 0
}
}
{
"errorMessage": "Client: [patroni1_5] Error:[Provided Port Number [5432] is already in use. Please provide another port.]",
"errorCode": 1,
"entity": {
"subclientId": 0,
"clientId": 1705,
"instanceName": "GK_PATRONI",
"instanceId": -1,
"_type_": 0
}
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Port Number already in use
- Invalid Library Directory
- Invalid Binary Directory
Schema
- errorMessage string
- errorCode integer
entity object
subclientId integerclientId integerinstanceName stringinstanceId integer_type_ integer
{
"errorMessage": "string",
"errorCode": 0,
"entity": {
"subclientId": 0,
"clientId": 0,
"instanceName": "string",
"instanceId": 0,
"_type_": 0
}
}
{
"errorMessage": "Provided Port Number [5432] is already in use. Please provide another port.",
"errorCode": 1,
"entity": {
"subclientId": 0,
"clientId": 4,
"instanceName": "pgauto1_4414_pg14",
"instanceId": -1,
"_type_": 0
}
}
{
"errorMessage": "Connection to PostgreSQL Server failed.\n[~Unable to locate libpq.so library file in PostGres Lib directory. Please provide valid PostGres Lib Path~]",
"errorCode": 4444,
"entity": {
"subclientId": 0,
"clientId": 4,
"instanceName": "pgauto1_4414_pg14",
"instanceId": 6882,
"_type_": 0
}
}
{
"errorMessage": "Invalid PostgreSQL bin directory.\n[~bin path directory:[/usr/pgsql-14] does not exist~]",
"errorCode": 4444,
"entity": {
"subclientId": 0,
"clientId": 4,
"instanceName": "pgauto1_4414_pg14",
"instanceId": 6883,
"_type_": 0
}
}