Skip to content

Resize Auto Scaling Group (Cardinality)

PUT
/api/v1/scaler/scalegroups/{scaler_id}
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/scaler/scalegroups/{scaler_id}?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"cardinality": 2,
"update_min_nodes": true
}'

Manually sets the number of running nodes (cardinality) for the group. The requested cardinality must be within the group’s [min_nodes, max_nodes] range. Set update_min_nodes: true to also raise min_nodes to the new cardinality so autoscaling does not immediately scale back down. A resize is rejected with 412 Precondition Failed if the group is not in a resizable state (for example while it is already SCALING).

scaler_id
required
integer

The id of the auto scaling group, as returned by List.

Example

12345
project_id
required
integer

Identifier of the project to scope the request to. Required integer project ID.

Example

<PROJECT_ID>
apikey
required
string

API key used to authenticate the request.

Example

<API_KEY>
location
required
string

Region of the group.

Example

<LOCATION>
Media typeapplication/json

Manually set the number of running nodes for the group.

object
cardinality
required

Target number of running nodes.

integer

Example

2
update_min_nodes

When true, also raise min_nodes to the new cardinality so autoscaling does not scale back down.

boolean

Example

true

Example

{
"cardinality": 2,
"update_min_nodes": true
}

Successful response

Media typeapplication/json

Resize confirmation. A resize on a group that is not in a resizable state returns 412 Precondition Failed with the reason in errors (for example “Service cannot be scaled in state: SCALING”).

object
code
integer
data
object
errors
object
message
string

Example

{
"code": 200,
"message": "Success"
}