POST/v2/databases/{database_cluster_uuid}/replicas

Create a read-only database replica

Creates a read-only replica for a PostgreSQL or MySQL database cluster. Supply name and size; size must be at least as large as the source cluster's node size, and region defaults to the cluster's region when omitted. The replica starts with a status of forking and transitions to active when it is ready to receive traffic.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 12 body fields
database_cluster_uuidstringrequired
The unique identifier of the database cluster for which to create a read-only replica.

Optional replica configuration. Supply name and size; other fields configure the replica or are returned by the API.

idstringoptional
A unique ID that can be used to identify and reference a database replica.
namestringrequired
The name to give the read-only replicating
regionstringoptional
A 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.
sizestringrequired
A 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.
statusstringoptional
A string representing the current status of the database cluster.
Allowed:creatingonlineresizingmigratingforking
tagsarray<string>optional
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. <br><br>Requires `tag:create` scope.
created_atstringoptional
A time value given in ISO8601 combined date and time format that represents when the database cluster was created.
private_network_uuidstringoptional
A 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. <br><br>Requires `vpc:read` scope.
connectionobjectoptional
Connection details for the replica.
private_connectionobjectoptional
Private connection details for the replica.
storage_size_mibintegeroptional
Additional 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.
do_settingsobjectoptional
Database-specific settings for the replica.

6 status codes
201Returns a `replica` object with the created replica's attributes, including its identifier, name, region, size, status, and connection details.
replicaobjectoptional
401Returned when authentication fails because the credentials are invalid.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404Returned when the requested database cluster resource is not found.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429Returned when the API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500Returned when a server error occurs.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 401 is returned for invalid credentials, a 404 when the database cluster is not found, a 429 when the API rate limit is exceeded, and a 500 when a server error occurs. name and size are required, and the replica size must be at least as large as the source cluster's node size. The database_cluster_uuid path parameter must identify an existing database cluster.