PostgreSQL
Last updated
Last updated
id, example: 500061854
OK
id, example: 500061854
OK
This method allows to delete a postgre SQL instance.
This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
DELETE /postgresql/123
id, example: 123
OK
Code of action performed
Status label of action
Human readable message of status
OK
This method allows to update a PostgreSQL instance.
Structure of payload is generic and describes :
operation
you want to be performedoptions
data relative to the operation performed - see details - optional.Below are different operations currently implemented.
Start PostgreSQL instance
Use the start
operation to start a PostgreSQL instance.
Starts PostgreSQL instance.
This method is asynchronous (status code 202
).
Example :
PATCH /postgresql/1234
{
"operation": "start"
}
Stop PostgreSQL instance
Use the stop
operation to stop the nodes of the PostgreSQL instance and the instance itself.
This operation cannot be undone afterwards.
This method is asynchronous (status code 202
).
PATCH /postgresql/1234
{
"operation":"stop"
}
Resize PostgreSQL instance
Use the resize
operation to resize the nodes of the PostgreSQL instance and the instance itself.
This operation cannot be undone afterwards.
This method is asynchronous (status code 202
).
PATCH /postgresql/1234
{
"operation":"resize",
"options": {
"sizing": "2cpu4gb"
}
}
Restore PostgreSQL instance
Use the restore
operation to restore a PostgreSQL instance to another PostgreSQL instance with the same farm version.
The available stop
options are BEFORE
and AFTER
.
This method is asynchronous (status code 202
).
PATCH /postgresql/5678
{
"operation": "restore",
"options": {
"sourceId": 1234,
"stop": "BEFORE",
"timestamp": "2022-11-02T09:32:02.000+00:00"
}
}
Convert from Standalone to HA PostgreSQL instance
Use the enable_ha
operation to convert a PostgreSQL instance from Standalone to HA mode.
This method is asynchronous (status code 202
).
PATCH /postgresql/5678
{
"operation": "enable_ha",
"options": {
"replicationLag": 50,
"changeReference": "000"
}
}
Update Monitoring
Use the update_monitoring
operation to update the monitoring state of the cluster.
Use the state
option to turn on/off monitoring.
Use the on_call
option to turn on/off 24/7 monitoring.
This method is asynchronous (status code 202
).
PATCH /postgresql/1234
{
"operation": "update_monitoring",
"options": {
"state": true,
"on_call": true
}
}
Update Patch Party
Use the update_patch_party
operation to update the patch party scheduled plan of the cluster.
excluded
option to turn on/off patch party.patchGroup
option to select the patching group, the patchGroup
is optional, and is only allowed when the farm has one member.exclusionReason
option to explain the reason of excluding the resource from patch part.This method is synchronous (status code 202
).
PATCH /postgresql/1234
{
"operation": "update_patch_party",
"options": {
"patchParty": {
"excluded": false,
"patchGroup": "3"
}
}
}
PATCH /postgresql/1234
{
"operation": "update_patch_party",
"options": {
"patchParty": {
"excluded": true,
"exclusionReason": "I want to handle this by myself"
}
}
}
Install PostgreSQL extension
Use the install_extension
operation to install an extension in the PostgreSQL.
This method is asynchronous (status code 202
).
PATCH /postgresql/1234
{
"operation":"install_extension",
"options": {
"dbname": "mydb",
"extensions_list": [
{"name": "ext1"},
{"name": "ext2"}
]
}
}
id, example: 123
OK
Code of action performed
Status label of action
Human readable message of status
This method allows to create a postgre SQL instance.
You will have to know at the minimum :
area
attribute). Areas can be available in List Regions method.name
attribute). The name can contain any lowercase characters or numbers (5-60). It must not be the keyword 'cluster'.nodeSizing
attribute). Ex: 2cpu2gbdiskSize
attribute). The possible values are at least 40 and maximum 1024 (representing GB).admPassword
attribute). The password must be At least one lowercase, one uppercase, one digit, one special character, minimum length must be 12.postgreVersion
attribute). Example: 13serviceId
attribute).networkId
attribute).topology
attribute). Either standalone / HAtrigram
attribute).allowedReplicationLag
attribute). The minimum size is 1 MB and maximum is 10240 MBHA topology extra fields: These fields are required for HA clusters:
nodePrefix
attribute). The prefix should be from 5 to 12 characters and can contain any uppercase character.az
attribute).trigram
attribute).tls
attribute).This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
POST /postgresql
{
"serviceId" : 123,
"nodeSizing" : "2cpu4gb",
"networkId" : 132,
"area" : "EB-QA",
"diskSize" : 40,
"admPassword" : "Test123@2022",
"postgreVersion" : "13",
"allowedReplicationLag" : 10,
"az" : "az",
"topology" : "STANDALONE",
"trigram" : "tri",
"tls" : true,
"name" : "NEWPOSTGRE01"
}
OK
Code of action performed
Status label of action
Human readable message of status
id, example: 500061854
OK
Representation of a resource patch party
Area. Refer to an Area of a Region, that is a low-latency network area, available in List Regions method. If absent, default Area of Region will be used.
Number of instances to create in Postgre cluster
Node sizing for Postgre cluster
The storage needed on each data node of the Postgre cluster
Network Id
IP Address of the resource
Allowed replication Lag
OK
Representation of a resource patch party
Information about a Storage of an Instance
Backup information on an instance
Replication information on an instance
Snapshot of an instance
Region pretty name
DataCenter pretty name
Area pretty name
Availability Zone pretty name
Total Disk size of the resource
CPU of the resource
RAM of the resource
Storage after disks format in GB of the resource
Instance is member of load balancer
Internal Image linked to this instance
OS name of this instance
OS type of this instance
This instance is ingress external node
This instance is ingress internal node
Information about storage replication in Progress