curl --request POST \
--url https://api.gcore.com/cloud/v1/dbaas/postgres/clusters/{project_id}/{region_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"cluster_name": "<string>",
"databases": [],
"flavor": {
"cpu": 1,
"memory_gib": 1
},
"high_availability": {
"replication_mode": "sync"
},
"network": {
"acl": [
"92.33.34.127"
],
"network_type": "public"
},
"pg_server_configuration": {
"pg_conf": "\nlisten_addresses = '\''localhost'\''\nport = 5432\nmax_connections = 100\nshared_buffers = 128MB\nlogging_collector = on",
"pooler": null,
"version": "<string>"
},
"storage": {
"size_gib": 100,
"type": "ssd-hiiops"
},
"users": []
}'
{
"tasks": [
"d478ae29-dedc-4869-82f0-96104425f565"
]
}
Create a new PostgreSQL cluster with the specified configuration.
curl --request POST \
--url https://api.gcore.com/cloud/v1/dbaas/postgres/clusters/{project_id}/{region_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"cluster_name": "<string>",
"databases": [],
"flavor": {
"cpu": 1,
"memory_gib": 1
},
"high_availability": {
"replication_mode": "sync"
},
"network": {
"acl": [
"92.33.34.127"
],
"network_type": "public"
},
"pg_server_configuration": {
"pg_conf": "\nlisten_addresses = '\''localhost'\''\nport = 5432\nmax_connections = 100\nshared_buffers = 128MB\nlogging_collector = on",
"pooler": null,
"version": "<string>"
},
"storage": {
"size_gib": 100,
"type": "ssd-hiiops"
},
"users": []
}'
{
"tasks": [
"d478ae29-dedc-4869-82f0-96104425f565"
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
List of created task IDs
The response is of type object
.
Was this page helpful?