{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to `/v2/databases/$DATABASE_ID/replicas` specifying the name it should be given, the size of the node to be used, and the region where it will be located.\n\n**Note**: Read-only replicas are not supported for Caching or Valkey clusters.\n\nThe 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`.","properties":{"path":{"type":"object","properties":{"database_cluster_uuid":{"type":"string","format":"uuid","examples":["9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"],"description":"A unique identifier for a database cluster."}},"required":["database_cluster_uuid"],"additionalProperties":false},"body":{"allOf":[{"$ref":"#/definitions/database_replica"}],"required":["name","size"],"examples":[{"name":"read-nyc3-01","region":"nyc3","size":"db-s-2vcpu-4gb","storage_size_mib":61440}]}},"required":["path"],"additionalProperties":false,"definitions":{"database_replica":{"type":"object","properties":{"name":{"type":"string","description":"The name to give the read-only replicating","examples":["read-nyc3-01"]},"region":{"type":"string","description":"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.","examples":["nyc3"]},"size":{"type":"string","description":"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.","examples":["db-s-2vcpu-4gb"]},"tags":{"type":"array","items":{"type":"string"},"description":"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.","examples":[["production"]]},"private_network_uuid":{"type":"string","description":"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.","examples":["9423cbad-9211-442f-820b-ef6915e99b5f"]},"connection":{"allOf":[{},{"$ref":"#/definitions/database_connection"}]},"private_connection":{"allOf":[{},{"$ref":"#/definitions/database_connection"}]},"storage_size_mib":{"type":"integer","description":"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.","examples":[61440]},"do_settings":{"allOf":[{"$ref":"#/definitions/do_settings"},{"description":"DigitalOcean-specific settings for the read-only replica, including custom service CNAMEs."}]}},"required":["name"]},"database_connection":{"type":"object","properties":{}},"do_settings":{"type":"object","description":"DigitalOcean-specific settings for the database cluster.","properties":{"service_cnames":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)+$","maxLength":253},"maxItems":16,"description":"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.","examples":[["db.example.com","database.myapp.io"]]}}}}},"name":"Create a Read-only Replica","id":"digitalocean.databases_create_replica","example":{"path":{"database_cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"}},"maxRequests":1,"summary":false}}