Resize a database of an application
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/database/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"instanceClass":"db.t4g.micro","storageGb":1,"multiAz":true,"applyImmediately":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/database/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "instanceClass": "db.t4g.micro", "storageGb": 1, "multiAz": true, "applyImmediately": true }'Changes the instance class, the storage or Multi-AZ of the active, pending (once ready) or previous database. Only fields that differ change; the class and Multi-AZ compare with the value the instance will have (live, or pending for the maintenance window), so the live value withdraws a pending change. A class change restarts the instance (a few minutes without the database, about a minute of failover with Multi-AZ). Storage only grows, by at least 10 %, and can change again only after 6 hours; to make a database smaller, provision a smaller one and promote it. applyImmediately false leaves the change for the maintenance window. RDS applies every pending change with an immediate one, so an immediate request is a 409 while a pending change it does not name exists. Needs the write_applications permission and the cloud:write scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation ID
The application ID
The database instance identifier
Request Bodyrequired
Section titled “Request Bodyrequired”At least one of instanceClass, storageGb, multiAz.
object
Grows only, by at least 10 %.
False: in the next maintenance window.
Responses
Section titled “Responses”The database already has that size. Nothing changed
object
The fields that change: only those that differ from the live instance.
object
The API path to poll.
Example
{ "role": "active"}RDS accepted the change. Poll the database: rdsStatus is modifying until it is done
object
The fields that change: only those that differ from the live instance.
object
The API path to poll.
Example
{ "role": "active"}A shrink, or a storage increase under 10 %
object
409 only: the operation that holds the application’s lock.
409 only: the operation that was refused.
409 only: the pending or previous database that blocks the request, or the provision in flight.
409 only: for a provision in flight, the path to poll on the platform (this API serves it at the database route).
Promote 409 only: the environments that have no user, or unreadable credentials, on the instance.
Delete 500 only: what could not be cleaned up.
Example
{ "operation": "provision", "requested": "provision"}The application or the database was not found
Another database operation holds the lock, the pending database is not ready, the instance is not available, or an immediate request does not name a pending change
object
409 only: the operation that holds the application’s lock.
409 only: the operation that was refused.
409 only: the pending or previous database that blocks the request, or the provision in flight.
409 only: for a provision in flight, the path to poll on the platform (this API serves it at the database route).
Promote 409 only: the environments that have no user, or unreadable credentials, on the instance.
Delete 500 only: what could not be cleaned up.
Example
{ "operation": "provision", "requested": "provision"}The body is invalid
The platform could not complete the request
object
409 only: the operation that holds the application’s lock.
409 only: the operation that was refused.
409 only: the pending or previous database that blocks the request, or the provision in flight.
409 only: for a provision in flight, the path to poll on the platform (this API serves it at the database route).
Promote 409 only: the environments that have no user, or unreadable credentials, on the instance.
Delete 500 only: what could not be cleaned up.
Example
{ "operation": "provision", "requested": "provision"}