Check PostgreSQL cluster quota
curl --request POST \
--url https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"cluster_name": "<string>",
"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",
"version": "<string>",
"pooler": null
},
"storage": {
"size_gib": 100,
"type": "ssd-hiiops"
},
"databases": [],
"users": []
}
EOFimport requests
url = "https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}"
payload = {
"cluster_name": "<string>",
"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": "
listen_addresses = 'localhost'
port = 5432
max_connections = 100
shared_buffers = 128MB
logging_collector = on",
"version": "<string>",
"pooler": None
},
"storage": {
"size_gib": 100,
"type": "ssd-hiiops"
},
"databases": [],
"users": []
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cluster_name: '<string>',
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',
version: '<string>',
pooler: null
},
storage: {size_gib: 100, type: 'ssd-hiiops'},
databases: [],
users: []
})
};
fetch('https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cluster_name' => '<string>',
'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' => '
listen_addresses = \'localhost\'
port = 5432
max_connections = 100
shared_buffers = 128MB
logging_collector = on',
'version' => '<string>',
'pooler' => null
],
'storage' => [
'size_gib' => 100,
'type' => 'ssd-hiiops'
],
'databases' => [
],
'users' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}"
payload := strings.NewReader("{\n \"cluster_name\": \"<string>\",\n \"flavor\": {\n \"cpu\": 1,\n \"memory_gib\": 1\n },\n \"high_availability\": {\n \"replication_mode\": \"sync\"\n },\n \"network\": {\n \"acl\": [\n \"92.33.34.127\"\n ],\n \"network_type\": \"public\"\n },\n \"pg_server_configuration\": {\n \"pg_conf\": \"\\nlisten_addresses = 'localhost'\\nport = 5432\\nmax_connections = 100\\nshared_buffers = 128MB\\nlogging_collector = on\",\n \"version\": \"<string>\",\n \"pooler\": null\n },\n \"storage\": {\n \"size_gib\": 100,\n \"type\": \"ssd-hiiops\"\n },\n \"databases\": [],\n \"users\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cluster_name\": \"<string>\",\n \"flavor\": {\n \"cpu\": 1,\n \"memory_gib\": 1\n },\n \"high_availability\": {\n \"replication_mode\": \"sync\"\n },\n \"network\": {\n \"acl\": [\n \"92.33.34.127\"\n ],\n \"network_type\": \"public\"\n },\n \"pg_server_configuration\": {\n \"pg_conf\": \"\\nlisten_addresses = 'localhost'\\nport = 5432\\nmax_connections = 100\\nshared_buffers = 128MB\\nlogging_collector = on\",\n \"version\": \"<string>\",\n \"pooler\": null\n },\n \"storage\": {\n \"size_gib\": 100,\n \"type\": \"ssd-hiiops\"\n },\n \"databases\": [],\n \"users\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cluster_name\": \"<string>\",\n \"flavor\": {\n \"cpu\": 1,\n \"memory_gib\": 1\n },\n \"high_availability\": {\n \"replication_mode\": \"sync\"\n },\n \"network\": {\n \"acl\": [\n \"92.33.34.127\"\n ],\n \"network_type\": \"public\"\n },\n \"pg_server_configuration\": {\n \"pg_conf\": \"\\nlisten_addresses = 'localhost'\\nport = 5432\\nmax_connections = 100\\nshared_buffers = 128MB\\nlogging_collector = on\",\n \"version\": \"<string>\",\n \"pooler\": null\n },\n \"storage\": {\n \"size_gib\": 100,\n \"type\": \"ssd-hiiops\"\n },\n \"databases\": [],\n \"users\": []\n}"
response = http.request(request)
puts response.read_body{
"baremetal_basic_count_limit": 0,
"baremetal_basic_count_requested": 1,
"baremetal_basic_count_usage": 0,
"baremetal_gpu_a100_count_limit": 0,
"baremetal_gpu_a100_count_requested": 1,
"baremetal_gpu_a100_count_usage": 0,
"baremetal_gpu_b200_count_limit": 0,
"baremetal_gpu_b200_count_requested": 1,
"baremetal_gpu_b200_count_usage": 0,
"baremetal_gpu_h100_count_limit": 0,
"baremetal_gpu_h100_count_requested": 1,
"baremetal_gpu_h100_count_usage": 0,
"baremetal_gpu_h200_count_limit": 0,
"baremetal_gpu_h200_count_requested": 1,
"baremetal_gpu_h200_count_usage": 0,
"baremetal_gpu_l40s_count_limit": 0,
"baremetal_gpu_l40s_count_requested": 1,
"baremetal_gpu_l40s_count_usage": 0,
"baremetal_hf_count_limit": 0,
"baremetal_hf_count_requested": 1,
"baremetal_hf_count_usage": 0,
"baremetal_infrastructure_count_limit": 0,
"baremetal_infrastructure_count_requested": 1,
"baremetal_infrastructure_count_usage": 0,
"baremetal_network_count_limit": 0,
"baremetal_network_count_requested": 1,
"baremetal_network_count_usage": 0,
"baremetal_storage_count_limit": 0,
"baremetal_storage_count_requested": 1,
"baremetal_storage_count_usage": 0,
"caas_container_count_limit": 0,
"caas_container_count_requested": 1,
"caas_container_count_usage": 0,
"caas_cpu_count_limit": 0,
"caas_cpu_count_requested": 1,
"caas_cpu_count_usage": 0,
"caas_gpu_count_limit": 0,
"caas_gpu_count_requested": 1,
"caas_gpu_count_usage": 0,
"caas_ram_size_limit": 0,
"caas_ram_size_requested": 1,
"caas_ram_size_usage": 0,
"cluster_count_limit": 0,
"cluster_count_requested": 1,
"cluster_count_usage": 0,
"cpu_count_limit": 0,
"cpu_count_requested": 1,
"cpu_count_usage": 0,
"dbaas_postgres_cluster_count_limit": 0,
"dbaas_postgres_cluster_count_requested": 1,
"dbaas_postgres_cluster_count_usage": 0,
"external_ip_count_limit": 0,
"external_ip_count_requested": 1,
"external_ip_count_usage": 0,
"faas_cpu_count_limit": 0,
"faas_cpu_count_requested": 1,
"faas_cpu_count_usage": 0,
"faas_function_count_limit": 0,
"faas_function_count_requested": 1,
"faas_function_count_usage": 0,
"faas_namespace_count_limit": 0,
"faas_namespace_count_requested": 1,
"faas_namespace_count_usage": 0,
"faas_ram_size_limit": 0,
"faas_ram_size_requested": 1,
"faas_ram_size_usage": 0,
"firewall_count_limit": 0,
"firewall_count_requested": 1,
"firewall_count_usage": 0,
"floating_count_limit": 0,
"floating_count_requested": 1,
"floating_count_usage": 0,
"gpu_count_limit": 0,
"gpu_count_requested": 1,
"gpu_count_usage": 0,
"gpu_virtual_a100_count_limit": 0,
"gpu_virtual_a100_count_requested": 1,
"gpu_virtual_a100_count_usage": 0,
"gpu_virtual_h100_count_limit": 0,
"gpu_virtual_h100_count_requested": 1,
"gpu_virtual_h100_count_usage": 0,
"gpu_virtual_h200_count_limit": 0,
"gpu_virtual_h200_count_requested": 1,
"gpu_virtual_h200_count_usage": 0,
"gpu_virtual_l40s_count_limit": 0,
"gpu_virtual_l40s_count_requested": 1,
"gpu_virtual_l40s_count_usage": 0,
"image_count_limit": 0,
"image_count_requested": 1,
"image_count_usage": 0,
"image_size_limit": 0,
"image_size_requested": 1,
"image_size_usage": 0,
"ipu_count_limit": 0,
"ipu_count_requested": 1,
"ipu_count_usage": 0,
"laas_topic_count_limit": 0,
"laas_topic_count_requested": 1,
"laas_topic_count_usage": 0,
"loadbalancer_count_limit": 0,
"loadbalancer_count_requested": 1,
"loadbalancer_count_usage": 0,
"network_count_limit": 0,
"network_count_requested": 1,
"network_count_usage": 0,
"ram_limit": 0,
"ram_requested": 1,
"ram_usage": 0,
"registry_count_limit": 0,
"registry_count_requested": 1,
"registry_count_usage": 0,
"registry_storage_limit": 0,
"registry_storage_requested": 1,
"registry_storage_usage": 0,
"router_count_limit": 0,
"router_count_requested": 1,
"router_count_usage": 0,
"secret_count_limit": 0,
"secret_count_requested": 1,
"secret_count_usage": 0,
"servergroup_count_limit": 0,
"servergroup_count_requested": 1,
"servergroup_count_usage": 0,
"sfs_count_limit": 0,
"sfs_count_requested": 1,
"sfs_count_usage": 0,
"sfs_size_limit": 0,
"sfs_size_requested": 1,
"sfs_size_usage": 0,
"shared_vm_count_limit": 0,
"shared_vm_count_requested": 1,
"shared_vm_count_usage": 0,
"slurm_cluster_count_limit": 0,
"slurm_cluster_count_requested": 1,
"slurm_cluster_count_usage": 0,
"snapshot_schedule_count_limit": 0,
"snapshot_schedule_count_requested": 1,
"snapshot_schedule_count_usage": 0,
"subnet_count_limit": 0,
"subnet_count_requested": 1,
"subnet_count_usage": 0,
"vm_count_limit": 0,
"vm_count_requested": 1,
"vm_count_usage": 0,
"volume_count_limit": 0,
"volume_count_requested": 1,
"volume_count_usage": 0,
"volume_size_limit": 0,
"volume_size_requested": 1,
"volume_size_usage": 0,
"volume_snapshots_count_limit": 0,
"volume_snapshots_count_requested": 1,
"volume_snapshots_count_usage": 0,
"volume_snapshots_size_limit": 0,
"volume_snapshots_size_requested": 1,
"volume_snapshots_size_usage": 0
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}Managed PostgreSQL
Check PostgreSQL cluster quota
Check if regional quota is exceeded for PostgreSQL cluster creation. If exceeded, calculate additional quotas needed.
POST
/
cloud
/
v1
/
dbaas
/
postgres
/
check_limit
/
{project_id}
/
{region_id}
Check PostgreSQL cluster quota
curl --request POST \
--url https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"cluster_name": "<string>",
"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",
"version": "<string>",
"pooler": null
},
"storage": {
"size_gib": 100,
"type": "ssd-hiiops"
},
"databases": [],
"users": []
}
EOFimport requests
url = "https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}"
payload = {
"cluster_name": "<string>",
"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": "
listen_addresses = 'localhost'
port = 5432
max_connections = 100
shared_buffers = 128MB
logging_collector = on",
"version": "<string>",
"pooler": None
},
"storage": {
"size_gib": 100,
"type": "ssd-hiiops"
},
"databases": [],
"users": []
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cluster_name: '<string>',
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',
version: '<string>',
pooler: null
},
storage: {size_gib: 100, type: 'ssd-hiiops'},
databases: [],
users: []
})
};
fetch('https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cluster_name' => '<string>',
'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' => '
listen_addresses = \'localhost\'
port = 5432
max_connections = 100
shared_buffers = 128MB
logging_collector = on',
'version' => '<string>',
'pooler' => null
],
'storage' => [
'size_gib' => 100,
'type' => 'ssd-hiiops'
],
'databases' => [
],
'users' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}"
payload := strings.NewReader("{\n \"cluster_name\": \"<string>\",\n \"flavor\": {\n \"cpu\": 1,\n \"memory_gib\": 1\n },\n \"high_availability\": {\n \"replication_mode\": \"sync\"\n },\n \"network\": {\n \"acl\": [\n \"92.33.34.127\"\n ],\n \"network_type\": \"public\"\n },\n \"pg_server_configuration\": {\n \"pg_conf\": \"\\nlisten_addresses = 'localhost'\\nport = 5432\\nmax_connections = 100\\nshared_buffers = 128MB\\nlogging_collector = on\",\n \"version\": \"<string>\",\n \"pooler\": null\n },\n \"storage\": {\n \"size_gib\": 100,\n \"type\": \"ssd-hiiops\"\n },\n \"databases\": [],\n \"users\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cluster_name\": \"<string>\",\n \"flavor\": {\n \"cpu\": 1,\n \"memory_gib\": 1\n },\n \"high_availability\": {\n \"replication_mode\": \"sync\"\n },\n \"network\": {\n \"acl\": [\n \"92.33.34.127\"\n ],\n \"network_type\": \"public\"\n },\n \"pg_server_configuration\": {\n \"pg_conf\": \"\\nlisten_addresses = 'localhost'\\nport = 5432\\nmax_connections = 100\\nshared_buffers = 128MB\\nlogging_collector = on\",\n \"version\": \"<string>\",\n \"pooler\": null\n },\n \"storage\": {\n \"size_gib\": 100,\n \"type\": \"ssd-hiiops\"\n },\n \"databases\": [],\n \"users\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/dbaas/postgres/check_limit/{project_id}/{region_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cluster_name\": \"<string>\",\n \"flavor\": {\n \"cpu\": 1,\n \"memory_gib\": 1\n },\n \"high_availability\": {\n \"replication_mode\": \"sync\"\n },\n \"network\": {\n \"acl\": [\n \"92.33.34.127\"\n ],\n \"network_type\": \"public\"\n },\n \"pg_server_configuration\": {\n \"pg_conf\": \"\\nlisten_addresses = 'localhost'\\nport = 5432\\nmax_connections = 100\\nshared_buffers = 128MB\\nlogging_collector = on\",\n \"version\": \"<string>\",\n \"pooler\": null\n },\n \"storage\": {\n \"size_gib\": 100,\n \"type\": \"ssd-hiiops\"\n },\n \"databases\": [],\n \"users\": []\n}"
response = http.request(request)
puts response.read_body{
"baremetal_basic_count_limit": 0,
"baremetal_basic_count_requested": 1,
"baremetal_basic_count_usage": 0,
"baremetal_gpu_a100_count_limit": 0,
"baremetal_gpu_a100_count_requested": 1,
"baremetal_gpu_a100_count_usage": 0,
"baremetal_gpu_b200_count_limit": 0,
"baremetal_gpu_b200_count_requested": 1,
"baremetal_gpu_b200_count_usage": 0,
"baremetal_gpu_h100_count_limit": 0,
"baremetal_gpu_h100_count_requested": 1,
"baremetal_gpu_h100_count_usage": 0,
"baremetal_gpu_h200_count_limit": 0,
"baremetal_gpu_h200_count_requested": 1,
"baremetal_gpu_h200_count_usage": 0,
"baremetal_gpu_l40s_count_limit": 0,
"baremetal_gpu_l40s_count_requested": 1,
"baremetal_gpu_l40s_count_usage": 0,
"baremetal_hf_count_limit": 0,
"baremetal_hf_count_requested": 1,
"baremetal_hf_count_usage": 0,
"baremetal_infrastructure_count_limit": 0,
"baremetal_infrastructure_count_requested": 1,
"baremetal_infrastructure_count_usage": 0,
"baremetal_network_count_limit": 0,
"baremetal_network_count_requested": 1,
"baremetal_network_count_usage": 0,
"baremetal_storage_count_limit": 0,
"baremetal_storage_count_requested": 1,
"baremetal_storage_count_usage": 0,
"caas_container_count_limit": 0,
"caas_container_count_requested": 1,
"caas_container_count_usage": 0,
"caas_cpu_count_limit": 0,
"caas_cpu_count_requested": 1,
"caas_cpu_count_usage": 0,
"caas_gpu_count_limit": 0,
"caas_gpu_count_requested": 1,
"caas_gpu_count_usage": 0,
"caas_ram_size_limit": 0,
"caas_ram_size_requested": 1,
"caas_ram_size_usage": 0,
"cluster_count_limit": 0,
"cluster_count_requested": 1,
"cluster_count_usage": 0,
"cpu_count_limit": 0,
"cpu_count_requested": 1,
"cpu_count_usage": 0,
"dbaas_postgres_cluster_count_limit": 0,
"dbaas_postgres_cluster_count_requested": 1,
"dbaas_postgres_cluster_count_usage": 0,
"external_ip_count_limit": 0,
"external_ip_count_requested": 1,
"external_ip_count_usage": 0,
"faas_cpu_count_limit": 0,
"faas_cpu_count_requested": 1,
"faas_cpu_count_usage": 0,
"faas_function_count_limit": 0,
"faas_function_count_requested": 1,
"faas_function_count_usage": 0,
"faas_namespace_count_limit": 0,
"faas_namespace_count_requested": 1,
"faas_namespace_count_usage": 0,
"faas_ram_size_limit": 0,
"faas_ram_size_requested": 1,
"faas_ram_size_usage": 0,
"firewall_count_limit": 0,
"firewall_count_requested": 1,
"firewall_count_usage": 0,
"floating_count_limit": 0,
"floating_count_requested": 1,
"floating_count_usage": 0,
"gpu_count_limit": 0,
"gpu_count_requested": 1,
"gpu_count_usage": 0,
"gpu_virtual_a100_count_limit": 0,
"gpu_virtual_a100_count_requested": 1,
"gpu_virtual_a100_count_usage": 0,
"gpu_virtual_h100_count_limit": 0,
"gpu_virtual_h100_count_requested": 1,
"gpu_virtual_h100_count_usage": 0,
"gpu_virtual_h200_count_limit": 0,
"gpu_virtual_h200_count_requested": 1,
"gpu_virtual_h200_count_usage": 0,
"gpu_virtual_l40s_count_limit": 0,
"gpu_virtual_l40s_count_requested": 1,
"gpu_virtual_l40s_count_usage": 0,
"image_count_limit": 0,
"image_count_requested": 1,
"image_count_usage": 0,
"image_size_limit": 0,
"image_size_requested": 1,
"image_size_usage": 0,
"ipu_count_limit": 0,
"ipu_count_requested": 1,
"ipu_count_usage": 0,
"laas_topic_count_limit": 0,
"laas_topic_count_requested": 1,
"laas_topic_count_usage": 0,
"loadbalancer_count_limit": 0,
"loadbalancer_count_requested": 1,
"loadbalancer_count_usage": 0,
"network_count_limit": 0,
"network_count_requested": 1,
"network_count_usage": 0,
"ram_limit": 0,
"ram_requested": 1,
"ram_usage": 0,
"registry_count_limit": 0,
"registry_count_requested": 1,
"registry_count_usage": 0,
"registry_storage_limit": 0,
"registry_storage_requested": 1,
"registry_storage_usage": 0,
"router_count_limit": 0,
"router_count_requested": 1,
"router_count_usage": 0,
"secret_count_limit": 0,
"secret_count_requested": 1,
"secret_count_usage": 0,
"servergroup_count_limit": 0,
"servergroup_count_requested": 1,
"servergroup_count_usage": 0,
"sfs_count_limit": 0,
"sfs_count_requested": 1,
"sfs_count_usage": 0,
"sfs_size_limit": 0,
"sfs_size_requested": 1,
"sfs_size_usage": 0,
"shared_vm_count_limit": 0,
"shared_vm_count_requested": 1,
"shared_vm_count_usage": 0,
"slurm_cluster_count_limit": 0,
"slurm_cluster_count_requested": 1,
"slurm_cluster_count_usage": 0,
"snapshot_schedule_count_limit": 0,
"snapshot_schedule_count_requested": 1,
"snapshot_schedule_count_usage": 0,
"subnet_count_limit": 0,
"subnet_count_requested": 1,
"subnet_count_usage": 0,
"vm_count_limit": 0,
"vm_count_requested": 1,
"vm_count_usage": 0,
"volume_count_limit": 0,
"volume_count_requested": 1,
"volume_count_usage": 0,
"volume_size_limit": 0,
"volume_size_requested": 1,
"volume_size_usage": 0,
"volume_snapshots_count_limit": 0,
"volume_snapshots_count_requested": 1,
"volume_snapshots_count_usage": 0,
"volume_snapshots_size_limit": 0,
"volume_snapshots_size_requested": 1,
"volume_snapshots_size_usage": 0
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}Authorizations
Body
application/json
Response
OK
Was this page helpful?