pydo.databases.update_cluster_size()

Generated on 9 Jun 2026 from pydo version v0.36.0

Usage

client.databases.update_cluster_size(
    database_cluster_uuid="9cc10173-e9ea-4176-9dbc-a4cee4c4ff30",
    body={
        "size": "db-s-4vcpu-8gb",
        "num_nodes": 3,
        "storage_size_mib": 61440,
    },
)
Returns NoneRaises HttpResponseError

Description

To resize a database cluster, send a PUT request to /v2/databases/{database_cluster_uuid}/resize. The body of the request must specify both the size and num_nodes attributes. A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its status attribute will now be set to resizing. This will transition back to online when the resize operation has completed.

Parameters

database_cluster_uuid string required

A unique identifier for a database cluster.

size string required

Example: db-s-4vcpu-8gb

A slug identifier representing desired the size of the nodes in the database cluster.

num_nodes integer required

Example: 3

The number of nodes in the database cluster. Valid values are are 1-3. In addition to the primary node, up to two standby nodes may be added for highly available configurations.

storage_size_mib integer optional

Example: 61440

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.

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "size": "db-s-4vcpu-8gb",
  "num_nodes": 3,
  "storage_size_mib": 163840
}

update_resp = client.databases.update_cluster_size(database_cluster_uuid="a7a8bas", body=req)

More Information

See /v2/databases/{database_cluster_uuid}/resize in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.