Skip to main content
GET
/
cloud
/
v1
/
dbaas
/
postgres
/
clusters
/
{project_id}
/
{region_id}
/
{cluster_name}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
postgres_cluster = client.cloud.databases.postgres.clusters.get(
    cluster_name="cluster_name",
    project_id=0,
    region_id=0,
)
print(postgres_cluster.cluster_name)
{
  "cluster_name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "databases": [
    {
      "name": "<string>",
      "owner": "<string>",
      "size": 123
    }
  ],
  "flavor": {
    "cpu": 2,
    "memory_gib": 2
  },
  "high_availability": {
    "replication_mode": "async"
  },
  "network": {
    "acl": [
      "<string>"
    ],
    "connection_string": "<string>",
    "host": "<string>",
    "network_type": "<string>"
  },
  "pg_server_configuration": {
    "pg_conf": "<string>",
    "version": "<string>",
    "pooler": null
  },
  "status": "DELETING",
  "storage": {
    "size_gib": 50,
    "type": "<string>"
  },
  "users": [
    {
      "is_secret_revealed": true,
      "name": "<string>",
      "role_attributes": [
        "BYPASSRLS"
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

cluster_name
string
required

Cluster name

Response

Cluster details

cluster_name
string
required
Required string length: 1 - 50
created_at
string<date-time>
required
databases
DatabaseOverview · object[]
required
flavor
Flavor · object
required

Instance RAM and CPU

high_availability
HighAvailabilityOptions · object
required
network
Network · object
required
pg_server_configuration
PostgreSQLServerConfig · object
required

Main PG configuration

status
enum<string>
required

Current cluster status

Available options:
DELETING,
FAILED,
PREPARING,
READY,
UNHEALTHY,
UNKNOWN,
UPDATING
storage
Storage · object
required

PG's storage configuration

users
PgUserOverview · object[]
required