Postgres Database

Update a PostgreSQL database

patch/project/{project_id}/location/{location}/postgres/{postgres_database_reference}

Request body

ha_typestring

High availability type

sizestring

Requested size for the underlying VM

storage_sizeinteger

Requested storage size in GiB

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"
    }
  ]
}