rds.replication.set

Make a cluster synchronous or asynchronous (live, no restart), and/or turn logical replication on or off (with a restart)

PATCH /rds/api/instances/{id}/replicationIAM rds:ModifyDBInstanceChanges stateDestructive

Synchronous is not strict: with no standby streaming, the leader keeps accepting writes and the health check reports sync-degraded until one is back. logicalReplication sets wal_level = logical; a cluster restarts member by member with one switchover, a single node restarts once (writes pause for the restart). Turning it off is refused while any logical slot exists.

Request syntax

PATCH /rds/api/instances/{id}/replication
{
  "replicationMode": "enum",
  "logicalReplication": "boolean"
}

Path parameters

  • idRequired

    string

    Constraints: 3-64 chars, /^(?!ewdoc-)[a-z0-9-]+$/

Request body

  • replicationModeOptional

    enum

    Cluster only, applied live. sync: a commit waits for one standby, so a failover loses nothing acknowledged; async: it does not wait. Omitted: unchanged

    One of: async, sync

  • logicalReplicationOptional

    boolean

    wal_level = logical for CDC and publications, applied with a restart; omitted: unchanged

Response

200 with instance (the database, as `get` describes it without `placement`), applied, replication ({ mode, state, syncStandbys }, null when replicationMode was not sent) and logicalReplication ({ enabled, applying }).

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Fields of data

  • instanceAlways

    object

    The database
  • instance.​idAlways

    string

    Database id (ewdb-…)
  • instance.​orgIdAlways

    string

    Organization that owns the database
  • instance.​identifierAlways

    string

    Name of the database, unique within the organization
  • instance.​engineAlways

    one of postgres, docdb

    Database engine; postgres for every managed PostgreSQL database
  • instance.​engineVersionAlways

    string

    PostgreSQL version the database is on, a pinned minor such as 17.11
  • instance.​instanceClassAlways

    string

    Instance type of every node, e.g. performance-2
  • instance.​regionIdAlways

    string

    Region the database is in, e.g. de1
  • instance.​availabilityZoneIdAlways

    string, may be null

    Zone asked for at create (e.g. de1b); null: the region's default zone, or spread over the zones for a cluster
  • instance.​vpcIdAlways

    string, may be null

    VPC the database joins; null: none
  • instance.​subnetIdAlways

    string, may be null

    Subnet of that VPC its addresses come from; null: the VPC's whole range
  • instance.​dbNameAlways

    string, may be null

    Database created inside the server at launch
  • instance.​masterUsernameAlways

    string

    Name of the master role, whose password is filed in Secrets
  • instance.​allocatedStorageGibAlways

    number

    Size of each node's data volume, GiB
  • instance.​maxAllocatedStorageGibAlways

    number, may be null

    Autoscaling ceiling, GiB; null: automatic growth is off
  • instance.​storageTypeAlways

    string

    Storage class label; informational
  • instance.​iopsAlways

    number, may be null

    Provisioned IOPS; not offered, so null
  • instance.​multiAzAlways

    boolean

    Not used: zonePlacement says how a cluster is spread over zones
  • instance.​publiclyAccessibleAlways

    boolean

    Whether the database answers on the internet; false: only from its VPC
  • instance.​topologyAlways

    one of single, cluster

    single: one node; cluster: three nodes with automatic failover
  • instance.​nodeCountAlways

    number

    Core nodes: 1 for single, 3 for a cluster (readers not counted)
  • instance.​masterSecretIdAlways

    string, may be null

    Secret holding the master password; null until it is filed
  • instance.​loadBalancerIdAlways

    string, may be null

    Load balancer in front of a cluster, on the platform's own fleet; null otherwise
  • instance.​endpointKindAlways

    one of hetzner-lb, fleet, may be null

    What a cluster's endpoint is: fleet (the platform's own load balancer) or hetzner-lb (the provider's); null on a single node
  • instance.​hetznerLoadBalancerIdAlways

    number, may be null

    The provider's id of a cluster's load balancer; null when there is none
  • instance.​hetznerNetworkIdAlways

    number, may be null

    The provider's id of the private network a cluster's members talk over; null on a single node
  • instance.​hetznerFirewallIdAlways

    number, may be null

    The provider's id of the database's firewall; null before it exists
  • instance.​reconcileErrorAlways

    string, may be null

    Why the last provisioning or teardown step failed; null when nothing failed
  • instance.​capacityFallbackAlways

    object

    What the create could fall back to when its type was sold out
  • instance.​capacityFallback.​otherZonesAlways

    boolean

    A sold-out zone may be replaced by another zone of the region
  • instance.​capacityFallback.​equivalentTypesAlways

    boolean

    A sold-out instance type may be replaced by an equivalent one
  • instance.​onStockOutAlways

    one of fail, wait

    Sold out with no fallback: fail the create, or wait for stock
  • instance.​capacityWaitUntilAlways

    string, may be null

    While waiting for stock: when the create gives up; null otherwise
  • instance.​requestedInstanceClassAlways

    string, may be null

    The instance type asked for, when a stock fallback bought another; null otherwise
  • instance.​statusAlways

    one of available, creating, modifying, backing-up, deleting, failed, stopped, starting, stopping, rebooting, maintenance, waiting-for-capacity, retained

    State of the database
  • instance.​retainedUntilAlways

    string, may be null

    For a retained database: when its backups are removed; null otherwise
  • instance.​endpointAddressAlways

    string, may be null

    Address clients connect to; null until the database is reachable
  • instance.​endpointPortAlways

    number, may be null

    Direct PostgreSQL port of the endpoint (5432); the pooler is on 6432
  • instance.​privateEndpointAddressAlways

    string, may be null

    The database's address inside its VPC, named in its certificate; null: use endpointAddress
  • instance.​parameterGroupIdAlways

    string, may be null

    Not used; parameters holds your values
  • instance.​backupRetentionDaysAlways

    number

    Days backups are kept; 0: scheduled backups are off
  • instance.​backupsEnabledAlways

    boolean

    Whether scheduled backups are taken
  • instance.​storageEncryptedAlways

    boolean

    Whether every node's data volume is encrypted at rest
  • instance.​storageKmsKeyIdAlways

    string, may be null

    KMS key that wraps every node volume's key; null: the platform key
  • instance.​backupAgentSeenAtAlways

    string, may be null

    When a node last asked for backup work; null: never
  • instance.​backupPollerVersionAlways

    number, may be null

    Version of the backup service on the nodes; 3 and up keep a backup taken by hand until it is deleted; null: not reported
  • instance.​lastBackupAtAlways

    string, may be null

    When the newest backup finished; null: never
  • instance.​backupWindowAlways

    string, may be null

    When the daily backup runs, UTC HH:MM-HH:MM (only the start is used)
  • instance.​maintenanceWindowAlways

    string, may be null

    Maintenance window, UTC ddd:hh24:mi-ddd:hh24:mi
  • instance.​deletionProtectionAlways

    boolean

    While true, delete is refused
  • instance.​performanceInsightsEnabledAlways

    boolean

    Not used; query insights are always on
  • instance.​autoMinorVersionUpgradeAlways

    boolean

    Whether new minor versions are applied in the maintenance window
  • instance.​parametersAlways

    map

    Your PostgreSQL parameter values by name; parameters not named keep their default
  • instance.​caCertIdentifierAlways

    string, may be null

    Name of the CA that signs the server certificate
  • instance.​tlsSerialAlways

    string, may be null

    Serial of the server certificate; null: the database has no certificate
  • instance.​tlsNotAfterAlways

    string, may be null

    When the server certificate expires
  • instance.​tlsNamesInCertAlways

    boolean

    Whether the certificate names the database's DNS endpoint names
  • instance.​tlsRequiredAlways

    boolean

    Whether clients that do not use TLS are refused
  • instance.​replicationModeAlways

    one of async, sync, may be null

    sync: a commit waits for one standby; async: it does not; null on a single node
  • instance.​zonePlacementAlways

    one of spread, single, may be null

    spread: members over the zones; single: all in one zone; null on a single node
  • instance.​logicalReplicationAlways

    boolean

    Whether wal_level is logical, for CDC and publications
  • instance.​branchPoolOfAlways

    string, may be null

    Set on the machine that serves the branches of another database: that database; null otherwise
  • instance.​branchSettingsAlways

    unknown

    Branch settings as stored (branch-settings reads them); null: the defaults
  • instance.​launchedAtAlways

    string, may be null

    When the database first became available
  • instance.​tagsAlways

    string, may be null

    Kept for compatibility; the tags API holds the tags of the database
  • instance.​createdAtAlways

    string

    When the database was created
  • instance.​updatedAtAlways

    string

    When the database record last changed
  • instance.​encryptionAlways

    object

    What is encrypted at rest
  • instance.​encryption.​storageAlways

    one of luks2, none

    luks2: every node's data volume is encrypted with a per-volume key from KMS; none: created before disk encryption
  • instance.​encryption.​backupsAlways

    one of aes-256-cbc, none

    aes-256-cbc: backups are encrypted on the database machine before upload; none: created before backup encryption
  • appliedAlways

    boolean

    The cluster took the replication mode (always true when it was not sent)
  • replicationAlways

    object, may be null

    Replication now; null when replicationMode was not sent
  • replication.​modeAlways

    one of async, sync

    The mode asked for
  • replication.​stateAlways

    one of ok, degraded, async, unknown

    ok: sync and a standby acknowledges commits; degraded: sync but none does; async; unknown: the cluster did not answer
  • replication.​syncStandbysAlways

    array of string

    Members a commit waits for (any one of them)
  • logicalReplicationAlways

    object

    Logical replication
  • logicalReplication.​enabledAlways

    boolean

    wal_level logical is asked for
  • logicalReplication.​applyingAlways

    boolean

    A restart that applies it was started by this call

Checked against the handlers: every route test validates their answers against this schema.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow rds:ModifyDBInstance on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud rds replication set id

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_rds_replication_set.