Skip to content

Upsert Scaling Policy

PUT
/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/scaling-policies
curl --request PUT \
--url https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/environments/example/scaling-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "metric": "CPUUtilization", "targetValue": 75, "scaleInCooldownSeconds": 300, "scaleOutCooldownSeconds": 60 }'

Creates or updates a target tracking scaling policy for the environment. Specify the metric type and target value. If a policy with the same metric or name exists, it will be updated. Optionally, provide a custom policy name via query.

organisation
required
string
application
required
string
environment
required
string
policyName
string

Optional. Specify a custom policy name to upsert.

Media typeapplication/json
object
metric
required

Metric to track for scaling.

string
Allowed values: CPUUtilization MemoryUtilization RPS
targetValue
required

Target value. Percentage for CPU/Memory; req/sec per task for RPS.

number format: double
Example
75
scaleInCooldownSeconds

Cooldown (seconds) before another scale-in can start.

integer
default: 300
scaleOutCooldownSeconds

Cooldown (seconds) before another scale-out can start.

integer
default: 60

Scaling policy created or updated successfully.

Media typeapplication/json
object
metric
string
Allowed values: CPUUtilization MemoryUtilization RPS
targetValue
number format: double
scaleInCooldownSeconds
integer
scaleOutCooldownSeconds
integer
policyName

Name of the underlying Application Auto Scaling policy.

string
resourceLabel

ALB ResourceLabel for RPS policies (target group identifier).

string
nullable
Example
{
"metric": "CPUUtilization"
}