Create a DBaaS PostgreSQL service

POST /dbaas-postgres/{name}

Path parameters

  • name string Required

    Service name

    Minimum length is 0, maximum length is 63.

Body Required

  • PGBouncer connection pooling settings

    • backup-hour integer(int64)

      The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.

      Minimum value is 0, maximum value is 23.

    • backup-minute integer(int64)

      The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.

      Minimum value is 0, maximum value is 59.

  • variant string

    Variant of the PostgreSQL service, may affect the features that are exposed by default

    Values are timescale or aiven.

  • integrations array[object]

    Service integrations to be enabled when creating the service.

    • type string Required

      Integration type

      Value is read_replica.

    • Service name

      Minimum length is 0, maximum length is 63.

    • Service name

      Minimum length is 0, maximum length is 63.

    • settings object

      Integration settings

  • TimescaleDB extension configuration values

  • ip-filter array[string]

    Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'

  • Service is protected against termination and powering off

  • Service name

    Minimum length is 0, maximum length is 63.

  • Synchronous replication type. Note that the service plan also needs to support synchronous replication.

    Values are quorum or off.

  • ISO time of a backup to recover from for services that support arbitrary times

    Minimum length is 1.

  • PGLookout settings

  • Automatic maintenance settings

    • dow string Required

      Day of week for installing updates

      Values are saturday, tuesday, never, wednesday, sunday, friday, monday, or thursday.

    • time string Required

      Time for installing updates, UTC

      Minimum length is 8, maximum length is 8.

  • Custom username for admin user. This must be set only when a new service is being created.

    Minimum length is 1, maximum length is 64. Format should match the following pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$.

  • version string

    PostgreSQL major version

    Minimum length is 1.

  • plan string Required

    Subscription plan

    Minimum length is 1, maximum length is 128.

  • work-mem integer(int64)

    Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).

    Minimum value is 1, maximum value is 1024.

  • Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.

    Minimum value is 20, maximum value is 60.

  • PostgreSQL-specific settings

  • Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.

    Minimum length is 8, maximum length is 256. Format should match the following pattern: ^[a-zA-Z0-9-_]+$.

  • Migrate data from existing server

    • host string Required

      Hostname or IP address of the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • port integer(int64) Required

      Port number of the server where to migrate data from

      Minimum value is 1, maximum value is 65535.

    • password string

      Password for authentication with the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • ssl boolean

      The server where to migrate data from is secured with SSL

    • username string

      User name for authentication with the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • dbname string

      Database name for bootstrapping the initial connection

      Minimum length is 1, maximum length is 63.

    • Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)

      Minimum length is 1, maximum length is 2048.

    • method string

      The migration method to be used

      Values are dump or replication.

Responses

  • 200 object

    200

    • id string(uuid)

      Operation ID

    • reason string

      Operation failure reason

      Values are incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, or conflict.

    • Related resource reference

      • id string(uuid)

        Reference ID

      • command string

        Command name

    • message string

      Operation message

    • state string

      Operation status

      Values are failure, pending, success, or timeout.

POST /dbaas-postgres/{name}
curl \
 -X POST https://api-ch-gva-2.exoscale.com/v2/dbaas-postgres/{name} \
 -H "Content-Type: application/json" \
 -d '{"pgbouncer-settings":{},"backup-schedule":{"backup-hour":42,"backup-minute":42},"variant":"timescale","integrations":[{"type":"read_replica","source-service":"string","dest-service":"string","settings":{}}],"timescaledb-settings":{},"ip-filter":["string"],"termination-protection":true,"fork-from-service":"string","synchronous-replication":"quorum","recovery-backup-time":"string","pglookout-settings":{},"maintenance":{"dow":"saturday","time":"string"},"admin-username":"string","version":"string","plan":"string","work-mem":42,"shared-buffers-percentage":42,"pg-settings":{},"admin-password":"string","migration":{"host":"string","port":42,"password":"string","ssl":true,"username":"string","dbname":"string","ignore-dbs":"string","method":"dump"}}'
Request example
{
  "pgbouncer-settings": {},
  "backup-schedule": {
    "backup-hour": 42,
    "backup-minute": 42
  },
  "variant": "timescale",
  "integrations": [
    {
      "type": "read_replica",
      "source-service": "string",
      "dest-service": "string",
      "settings": {}
    }
  ],
  "timescaledb-settings": {},
  "ip-filter": [
    "string"
  ],
  "termination-protection": true,
  "fork-from-service": "string",
  "synchronous-replication": "quorum",
  "recovery-backup-time": "string",
  "pglookout-settings": {},
  "maintenance": {
    "dow": "saturday",
    "time": "string"
  },
  "admin-username": "string",
  "version": "string",
  "plan": "string",
  "work-mem": 42,
  "shared-buffers-percentage": 42,
  "pg-settings": {},
  "admin-password": "string",
  "migration": {
    "host": "string",
    "port": 42,
    "password": "string",
    "ssl": true,
    "username": "string",
    "dbname": "string",
    "ignore-dbs": "string",
    "method": "dump"
  }
}
Response example (200)
{
  "id": "string",
  "reason": "incorrect",
  "reference": {
    "id": "string",
    "link": "string",
    "command": "string"
  },
  "message": "string",
  "state": "failure"
}