Create Auto Scaling Group
Provisions an auto scaling group ("scale group"). The group launches between min_nodes and max_nodes identical nodes from the selected image and plan, and scales the running count automatically according to its scaling policies.
At least one of policy (elastic) or scheduled_policy is required.
-
Elastic
policyreacts to a metric (CPU, MEMORY, or a custom parameter). It is sent as two objects: a scale-up rule (adjust: 1) and a scale-down rule (adjust: -1). -
Scheduled
scheduled_policychanges the target node count on a cron schedule. It is sent as two objects (scale-up and scale-down), wherescheduled_policy[0].adjust<=max_nodes,scheduled_policy[1].adjust>=min_nodes, andscheduled_policy[0].adjust>=scheduled_policy[1].adjust.
A group can have at most 60 nodes (MAX_NODES_PER_GROUP). For a private cluster (is_private: true) send custom_sku and host_ids and a mandatory vpc, instead of plan_id. On success the group is returned in Deploying state - poll List or Detail until it is Running.
/api/v1/scaler/scalegroupsQuery parameters
project_idQueryintegerrequiredIdentifier of the project to scope the request to. Required integer project ID.
- required
- must be a valid integer project ID
example{{project_id}}apikeyQuerystringrequiredAPI key used to authenticate the create request.
- required
- non-empty string
example{{api_key}}locationQuerystringrequiredRegion in which the group will be provisioned.
- required
- must be a valid region name (e.g., Delhi, Chennai)
example{{location}}
Request body
application/json
Create payload for an auto scaling group. Send policy for elastic (metric-based) scaling, scheduled_policy for cron-based scaling, or both - at least one is required. For a public group send plan_id; for a private cluster set is_private: true and send custom_sku, host_ids and a mandatory vpc instead.
Display name of the auto scaling group.
web-autoscale-group- required
- max length 40 characters
Minimum number of running nodes the group will maintain.
2- required
- integer >= 0
- must be <= max_nodes
Initial target number of running nodes. On create this equals min_nodes.
2- required
- must be between min_nodes and max_nodes
Maximum number of running nodes the group may scale to.
5- required
- integer
- must not exceed 60 (MAX_NODES_PER_GROUP)
ID of the compute plan (SKU) backing each node. Required for a public group (is_private false).
1088- required when is_private is false
- must be a valid plan ID from Plan
Human-readable plan name, from Plan.
C3.8GB- optional
Plan slug identifier, from Plan.
e2e_public_cloud- optional
SKU identifier for the selected plan.
12345- optional
ID of the image the nodes boot from.
12345- required for a public group
- must be a valid image ID
Name of the selected image.
Ubuntu-22.04- optional
Template ID of the selected image (its template_id).
12345- required
- must be a valid image template ID
ID of the security group to attach to the group's nodes at create time.
12345- optional
- must be a valid security group ID
VPC networks to attach to the group. Mandatory for a private cluster.
Whether each node should be launched with a public IP.
true- required
- boolean
Whether to enable disk encryption on the nodes.
true- optional
- defaults to false
Passphrase used for disk encryption. Required when isEncryptionEnabled is true.
Secret@123- required when isEncryptionEnabled is true
- length 8 to 12 characters
- must contain a lowercase letter, an uppercase letter and a special character
Whether the elastic policy uses a Default metric (CPU/MEMORY) or a Custom parameter.
Default- one of Default | Custom
Name of the custom scaling metric, when policy_type is Custom.
REQUESTS_PER_SEC- required when policy_type is Custom
- matches [A-Z0-9]([_]?[A-Z0-9])+
- cannot be CPU or MEMORY
- max length 50 characters
Initial value of the custom metric. Sent as 0 at create time.
0- optional
- 0 on create
Whether to launch the group on a private (dedicated) cluster.
false- optional
- defaults to false
IDs of the private-cluster hosts to place nodes on. Used when is_private is true.
- used only when is_private is true
Custom node sizing for a private cluster. Used when is_private is true.
Elastic (metric-based) scaling rules. Sent as two objects: a scale-up rule (adjust 1) and a scale-down rule (adjust -1).
Scheduled (cron-based) scaling rules. Sent as two objects: a scale-up and a scale-down target. scheduled_policy[0].adjust must be <= max_nodes, scheduled_policy[1].adjust must be >= min_nodes, and scheduled_policy[0].adjust must be >= scheduled_policy[1].adjust.
Responses
200Successful response
The newly created auto scaling group, in Deploying state.
200Success