Postgres Database

Set maintenance window for the PostgreSQL database

post/project/{project_id}/location/{location}/postgres/{postgres_database_reference}/set-maintenance-window

Path parameters

project_idstring required
Example:pjkkmx0f2vke4h36nk9cm8v8q0

ID of the project

locationstring required
Example:eu-central-h1

The Ubicloud location/region

postgres_database_referencestring required

Resource ID or name

Postgres database ID or name

Request body

maintenance_window_start_atinteger
maintenance_window_daysMaintenanceWindowDay[]

Response

A Postgres Database

flavorstring required

Kind of Postgres database

ha_typestring required

High availability type

target_server_countinteger required

Target number of servers (primary + standbys)

idstring required

ID of the Postgres database

locationstring required

Location of the Postgres database

namestring required

Name of the Postgres database

statestring required

State of the Postgres database

storage_size_gibinteger required

Storage size in GiB

target_storage_size_gibinteger

Desired storage size in GiB

version'16' | '17' | '18' required

Current Postgres version

target_version'16' | '17' | '18' required

Target Postgres version

vm_sizestring required

Size of the underlying VM

target_vm_sizestring

Desired VM size

ca_certificatesstring nullable

CA certificates of the root CA used to issue postgres server certificates

maintenance_window_start_atinteger nullable required

Maintenance window start time

maintenance_window_daysMaintenanceWindowDay[]

Days of the week the maintenance window applies to (empty list means every day)

read_replicaboolean required

If the database is a read replica or not

parentstring nullable

Parent Postgres database

fallback_activeboolean required

Whether the primary server is running on a fallback instance type

created_atstring date-time required

Creation timestamp of the Postgres database

connection_stringstring nullable required

Connection string to the Postgres database

private_connection_stringstring nullable required

Private connection string to the Postgres database, accessible from connected subnets

usernamestring nullable required

Username for the Postgres database

passwordstring nullable required

Password for the Postgres database

hostnamestring nullable required

Hostname for the Postgres database

earliest_restore_timestring nullable required

Earliest restore time (if primary)

latest_restore_timestring required

Latest restore time (if primary)"

primaryboolean required

Is the database primary

Example response

{
  "id": "pgn30gjk1d1e2jj34v9x0dq4rp",
  "firewall_rules": [
    {
      "id": "frmjgkgbktw62k53005jpx8tt7"
    }
  ]
}