dots.v2.databases.byDatabase_cluster_uuid().replicas.post()
Generated on 27 Oct 2026
from DoTs version
v1.21.0
Usage
client.v2.databases.byDatabase_cluster_uuid(database_cluster_uuid).replicas.post(body: Database_replica, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | ReplicasPostResponse>Description
To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to /v2/databases/{database_cluster_uuid}/replicas specifying the name it should be given, the size of the node to be used, and the region where it will be located.
Note: Read-only replicas are not supported for Caching or Valkey clusters.
The response will be a JSON object with a key called replica. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica’s status attribute will be forking. When the replica is ready to receive traffic, this will transition to active.
Parameters
Path Parameters
database_cluster_uuidstring requiredExample:
9cc10173-e9ea-4176-9dbc-a4cee4c4ff30A unique identifier for a database cluster.
Request Body
idstring optional read-onlyExample:
9cc10173-e9ea-4176-9dbc-a4cee4c4ff30A unique ID that can be used to identify and reference a database replica.
namestring requiredExample:
read-nyc3-01The name to give the read-only replicating
regionstring optionalExample:
nyc3A slug identifier for the region where the read-only replica will be located. If excluded, the replica will be placed in the same region as the cluster.
sizestring requiredExample:
db-s-2vcpu-4gbA slug identifier representing the size of the node for the read-only replica. The size of the replica must be at least as large as the node size for the database cluster from which it is replicating.
statusstring optional read-onlyA string representing the current status of the database cluster.
tagsarray of strings optionalExample:
["production"]A flat array of tag names as strings to apply to the read-only replica after it is created. Tag names can either be existing or new tags.
Requirestag:createscope.createdAtstring optional read-onlyExample:
2019-01-11T18:37:36ZA time value given in ISO8601 combined date and time format that represents when the database cluster was created.
privateNetworkUuidstring optionalExample:
9423cbad-9211-442f-820b-ef6915e99b5fA string specifying the UUID of the VPC to which the read-only replica will be assigned. If excluded, the replica will be assigned to your account's default VPC for the region.
Requiresvpc:readscope.connectionobject optional read-onlyShow child properties
uristring optional read-onlyExample:
postgres://doadmin:[email protected]:25060/defaultdb?sslmode=requireA connection string in the format accepted by the
psqlcommand. This is provided as a convenience and should be able to be constructed by the other attributes.databasestring optional read-onlyExample:
defaultdbThe name of the default database.
hoststring optional read-onlyExample:
db.example.comThe FQDN pointing to the database cluster's current primary node.
portinteger optional read-onlyExample:
25060The port on which the database cluster is listening.
userstring optional read-onlyExample:
doadminThe default user for the database.
Requiresdatabase:view_credentialsscope.passwordstring optional read-onlyExample:
example_passwordThe randomly generated password for the default user.
Requiresdatabase:view_credentialsscope.sslboolean optional read-onlyExample:
trueA boolean value indicating if the connection should be made over SSL.
privateConnectionobject optional read-onlyShow child properties
uristring optional read-onlyExample:
postgres://doadmin:[email protected]:25060/defaultdb?sslmode=requireA connection string in the format accepted by the
psqlcommand. This is provided as a convenience and should be able to be constructed by the other attributes.databasestring optional read-onlyExample:
defaultdbThe name of the default database.
hoststring optional read-onlyExample:
db.example.comThe FQDN pointing to the database cluster's current primary node.
portinteger optional read-onlyExample:
25060The port on which the database cluster is listening.
userstring optional read-onlyExample:
doadminThe default user for the database.
Requiresdatabase:view_credentialsscope.passwordstring optional read-onlyExample:
example_passwordThe randomly generated password for the default user.
Requiresdatabase:view_credentialsscope.sslboolean optional read-onlyExample:
trueA boolean value indicating if the connection should be made over SSL.
storageSizeMibinteger optionalExample:
61440Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage.
doSettingsobject optionalDigitalOcean-specific settings for the database cluster.
Show child properties
serviceCnamesarray of strings optionalExample:
["db.example.com", "database.myapp.io"]An array of custom CNAMEs for the database cluster. Each CNAME must be a valid RFC 1123 hostname (e.g., "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253 characters.
Request Sample
Response Example
More Information
See /v2/databases/{database_cluster_uuid}/replicas in the API reference for additional detail on responses, headers, parameters, and more.