Skip to content

Update Auto Scaling Group Configuration

PUT
/api/v1/scaler/scalegroups/update/{scaler_id}/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/scaler/scalegroups/update/{scaler_id}/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "web-autoscale-group",
"plan_id": 1088,
"is_private": false,
"min_nodes": 1,
"max_nodes": 5,
"policy_type": "Default",
"policy": [
{
"type": "CHANGE",
"adjust": 1,
"parameter": "CPU",
"operator": ">",
"value": 60,
"period_number": 3,
"period": 10,
"cooldown": 150
},
{
"type": "CHANGE",
"adjust": -1,
"parameter": "CPU",
"operator": "<",
"value": 30,
"period_number": 3,
"period": 10,
"cooldown": 150
}
],
"scheduled_policy": [
{
"type": "CARDINALITY",
"adjust": 4,
"recurrence": "0 12 * * *"
},
{
"type": "CARDINALITY",
"adjust": 2,
"recurrence": "0 2 * * *"
}
]
}'

Updates a group’s configuration: its name, min_nodes / max_nodes, the backing plan_id, the policy_type, and the elastic (policy) and scheduled (scheduled_policy) rules. The same min/max and policy validation as Create applies (max_nodes <= 60, the scheduled-policy ordering rules, and at least one of policy / scheduled_policy). For a private cluster set is_private: true and omit plan_id.

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 update request.

Example

<API_KEY>
location
required
string

Region of the group being updated.

Example

<LOCATION>
Media typeapplication/json

Update payload for an auto scaling group’s configuration and scaling policies. The same min/max and policy validation as create applies.

object
name
required

Display name of the group.

string

Example

web-autoscale-group
plan_id

ID of the compute plan backing each node. Required when is_private is false.

integer

Example

1088
is_private

Whether the group runs on a private cluster.

boolean

Example

false
min_nodes
required

Minimum number of running nodes.

integer

Example

1
max_nodes
required

Maximum number of running nodes.

integer

Example

5
policy_type

Whether the elastic policy uses a Default metric or a Custom parameter.

string
Allowed values: Default Custom

Example

Default
policy

Elastic scaling rules (scale-up and scale-down). See Create for field detail.

Array<object>
object
type
string

Example

CHANGE
adjust
integer

Example

1
parameter
string

Example

CPU
operator
string

Example

>
value
integer

Example

60
period_number
integer

Example

3
period
integer

Example

10
cooldown
integer

Example

150
scheduled_policy

Scheduled scaling rules (scale-up and scale-down). See Create for field detail.

Array<object>
object
type
string

Example

CARDINALITY
adjust
integer

Example

4
recurrence
string

Example

0 12 * * *

Example

{
"name": "web-autoscale-group",
"plan_id": 1088,
"is_private": false,
"min_nodes": 1,
"max_nodes": 5,
"policy_type": "Default",
"policy": [
{
"type": "CHANGE",
"adjust": 1,
"parameter": "CPU",
"operator": ">",
"value": 60,
"period_number": 3,
"period": 10,
"cooldown": 150
},
{
"type": "CHANGE",
"adjust": -1,
"parameter": "CPU",
"operator": "<",
"value": 30,
"period_number": 3,
"period": 10,
"cooldown": 150
}
],
"scheduled_policy": [
{
"type": "CARDINALITY",
"adjust": 4,
"recurrence": "0 12 * * *"
},
{
"type": "CARDINALITY",
"adjust": 2,
"recurrence": "0 2 * * *"
}
]
}

Successful response

Media typeapplication/json

Update confirmation.

object
code
integer
data
object
errors
object
message
string

Example

{
"code": 200,
"message": "service updated sucessfully, service_name: web-autoscale-group"
}