operationId: databases_update_clusterSize
summary: Resize a Database Cluster
description: >-
To resize a database cluster, send a PUT request to
`/v2/databases/$DATABASE_ID/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.
tags:
- Databases
parameters:
- $ref: 'parameters.yml#/database_cluster_uuid'
requestBody:
required: true
content:
application/json:
schema:
$ref: 'models/database_cluster_resize.yml'
example:
size: db-s-4vcpu-8gb
num_nodes: 3
storage_size_mib: 163840
responses:
'202':
$ref: '../../shared/responses/no_content.yml'
'401':
$ref: '../../shared/responses/unauthorized.yml'
'404':
$ref: '../../shared/responses/not_found.yml'
'429':
$ref: '../../shared/responses/too_many_requests.yml'
'500':
$ref: '../../shared/responses/server_error.yml'
default:
$ref: '../../shared/responses/unexpected_error.yml'
x-codeSamples:
- $ref: 'examples/curl/databases_update_clusterSize.yml'
- $ref: 'examples/go/databases_update_clusterSize.yml'
- $ref: 'examples/python/databases_update_clusterSize.yml'
security:
- bearer_auth:
- 'database:update'