Skip to content

Resize a database of an application

PATCH
/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}
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.

organisation
required
string

The organisation ID

application
required
string

The application ID

instanceId
required
string
/^[a-z][a-z0-9-]{0,62}$/

The database instance identifier

Media typeapplication/json

At least one of instanceClass, storageGb, multiAz.

object
instanceClass
string
Allowed values: db.t4g.micro db.t4g.small db.t4g.medium db.t4g.large db.t4g.xlarge db.t4g.2xlarge
storageGb

Grows only, by at least 10 %.

integer
>= 20 <= 900
multiAz
boolean
applyImmediately

False: in the next maintenance window.

boolean
default: true

The database already has that size. Nothing changed

Media typeapplication/json
object
message
string
orgName
string
appName
string
instanceId
string
role
string
Allowed values: active next previous
applyImmediately
boolean
changes

The fields that change: only those that differ from the live instance.

object
instanceClass
string
storageGb
integer
multiAz
boolean
statusUrl

The API path to poll.

string
note
string
Example
{
"role": "active"
}

RDS accepted the change. Poll the database: rdsStatus is modifying until it is done

Media typeapplication/json
object
message
string
orgName
string
appName
string
instanceId
string
role
string
Allowed values: active next previous
applyImmediately
boolean
changes

The fields that change: only those that differ from the live instance.

object
instanceClass
string
storageGb
integer
multiAz
boolean
statusUrl

The API path to poll.

string
note
string
Example
{
"role": "active"
}

A shrink, or a storage increase under 10 %

Media typeapplication/json
object
message
string
operation

409 only: the operation that holds the application’s lock.

string
Allowed values: provision promote delete
requested

409 only: the operation that was refused.

string
Allowed values: provision promote delete
instanceId

409 only: the pending or previous database that blocks the request, or the provision in flight.

string
statusUrl

409 only: for a provision in flight, the path to poll on the platform (this API serves it at the database route).

string
environments

Promote 409 only: the environments that have no user, or unreadable credentials, on the instance.

Array<string>
errors

Delete 500 only: what could not be cleaned up.

Array<string>
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

Media typeapplication/json
object
message
string
operation

409 only: the operation that holds the application’s lock.

string
Allowed values: provision promote delete
requested

409 only: the operation that was refused.

string
Allowed values: provision promote delete
instanceId

409 only: the pending or previous database that blocks the request, or the provision in flight.

string
statusUrl

409 only: for a provision in flight, the path to poll on the platform (this API serves it at the database route).

string
environments

Promote 409 only: the environments that have no user, or unreadable credentials, on the instance.

Array<string>
errors

Delete 500 only: what could not be cleaned up.

Array<string>
Example
{
"operation": "provision",
"requested": "provision"
}

The body is invalid

The platform could not complete the request

Media typeapplication/json
object
message
string
operation

409 only: the operation that holds the application’s lock.

string
Allowed values: provision promote delete
requested

409 only: the operation that was refused.

string
Allowed values: provision promote delete
instanceId

409 only: the pending or previous database that blocks the request, or the provision in flight.

string
statusUrl

409 only: for a provision in flight, the path to poll on the platform (this API serves it at the database route).

string
environments

Promote 409 only: the environments that have no user, or unreadable credentials, on the instance.

Array<string>
errors

Delete 500 only: what could not be cleaned up.

Array<string>
Example
{
"operation": "provision",
"requested": "provision"
}