Scaleway logo
Commands

Documentation for `scw autoscaling`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

Autoscaling Groups API

Alerts management commands

Alerts notify you of issues affecting your autoscaling groups, such as quota limits, stock issues, or configuration problems.

List autoscaling group alerts

List active and historical alerts for a specified autoscaling group.

Usage:

TerminalCode
scw autoscaling alerts list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
group-id
page-token
page-size
project-idProject ID to use. If none is passed the default project ID will be used
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

List all alerts for an autoscaling group

TerminalCode
scw autoscaling alerts list group-id=11111111-1111-1111-1111-111111111111

Groups management commands

Autoscaling groups automatically adjust the number of Instances based on metrics like CPU or memory usage. This allows you to automatically scale your infrastructure up or down to meet demand while optimizing costs.

Create an autoscaling group

Create a new autoscaling group with the specified configuration including template, scaling policy, and optional load balancer settings.

Usage:

TerminalCode
scw autoscaling group create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameName of the autoscaling groupDefault: <generated>
tags.{index}Tags associated with the group
template-idTemplate ID for instances in this group
scaling-policy-spec.minimum-sizeMinimum number of instances in the groupRequired
scaling-policy-spec.maximum-sizeMaximum number of instances in the groupRequired
scaling-policy-spec.scale-out-cooldownCooldown period after a scale out event
scaling-policy-spec.scale-in-cooldownCooldown period after a scale in event
scaling-policy-spec.scale-in-stepNumber of instances to remove in a single scale in event
scaling-policy-spec.scale-out-stepNumber of instances to add in a single scale out event
scaling-policy-spec.fixed-size.sizeRequired
scaling-policy-spec.cpu-target.target-avg-percentRequired
scaling-policy-spec.memory-target.target-avg-percentRequired
load-balancer-configuration-spec.load-balancer-idID of the load balancer (set to empty to disable)
load-balancer-configuration-spec.backends.{index}.backend-idID of the load balancer backend
load-balancer-configuration-spec.backends.{index}.address-familyIP address family (IPv4 or IPv6)One of: unknown_address_family, ipv4, ipv6
load-balancer-configuration-spec.backends.{index}.private-network-idOptional private network ID
load-balancer-configuration-spec.auto-healing.enabledWhether auto-healing is enabled
load-balancer-configuration-spec.auto-healing.grace-periodGrace period for health checks
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

Create an autoscaling group with a fixed size

TerminalCode
scw autoscaling group create scaling-policy-spec.fixed-size.size=3 scaling-policy-spec.maximum-size=5 scaling-policy-spec.minimum-size=1 name=my-autoscaling-group template-id=11111111-1111-1111-1111-111111111111 project-id=11111111-1111-1111-1111-111111111111

Delete an autoscaling group

Delete a specified autoscaling group and all its associated resources.

Usage:

TerminalCode
scw autoscaling group delete <group-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
group-idID of the group to deleteRequired
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

Delete a specified autoscaling group

TerminalCode
scw autoscaling group delete 11111111-1111-1111-1111-111111111111

Get an autoscaling group

Get details of a specified autoscaling group including its configuration, current size, and status.

Usage:

TerminalCode
scw autoscaling group get <group-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
group-idID of the group to getRequired
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

Get a specified autoscaling group

TerminalCode
scw autoscaling group get 11111111-1111-1111-1111-111111111111

List autoscaling groups

List all autoscaling groups in a project.

Usage:

TerminalCode
scw autoscaling group list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder criteria for listing groupsOne of: created_at_desc, created_at_asc
page-sizePage size for pagination
page-tokenToken for pagination
project-idProject ID to use. If none is passed the default project ID will be used
template-idTemplate ID to filter groups
load-balancer-idLoad balancer ID to filter groups
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

List all autoscaling groups in your default zone

TerminalCode
scw autoscaling group list

List autoscaling groups filtered by template

TerminalCode
scw autoscaling group list template-id=11111111-1111-1111-1111-111111111111

List autoscaling groups filtered by load balancer

TerminalCode
scw autoscaling group list load-balancer-id=11111111-1111-1111-1111-111111111111

Refresh an autoscaling group

This will replace all the instances of the group. Its main use case is applying changes if the instance template has been updated.

Usage:

TerminalCode
scw autoscaling group refresh [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
group-idRequired
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

Replace all the instances of an autoscaling group

TerminalCode
scw autoscaling group refresh group-id=11111111-1111-1111-1111-111111111111

Update an autoscaling group

Update the configuration of a specified autoscaling group including name, tags, template, scaling policy, and load balancer settings.

Usage:

TerminalCode
scw autoscaling group update <group-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
group-idID of the group to updateRequired
nameNew name for the group
tags.{index}New tags for the group
template-idNew template ID for instances
scaling-policy-spec.minimum-sizeMinimum number of instances in the group
scaling-policy-spec.maximum-sizeMaximum number of instances in the group
scaling-policy-spec.scale-out-cooldownCooldown period after a scale out event
scaling-policy-spec.scale-in-cooldownCooldown period after a scale in event
scaling-policy-spec.scale-in-stepNumber of instances to remove in a single scale in event
scaling-policy-spec.scale-out-stepNumber of instances to add in a single scale out event
scaling-policy-spec.fixed-size.size
scaling-policy-spec.cpu-target.target-avg-percent
scaling-policy-spec.memory-target.target-avg-percent
load-balancer-configuration-spec.load-balancer-idID of the load balancer (set to empty to disable)
load-balancer-configuration-spec.backends.{index}.backend-idID of the load balancer backend
load-balancer-configuration-spec.backends.{index}.address-familyIP address family (IPv4 or IPv6)One of: unknown_address_family, ipv4, ipv6
load-balancer-configuration-spec.backends.{index}.private-network-idOptional private network ID
load-balancer-configuration-spec.auto-healing.enabledWhether auto-healing is enabled
load-balancer-configuration-spec.auto-healing.grace-periodGrace period for health checks
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

Update the name of an autoscaling group

TerminalCode
scw autoscaling group update 11111111-1111-1111-1111-111111111111 name=new-name

Update the scaling policy of an autoscaling group

TerminalCode
scw autoscaling group update group-id=11111111-1111-1111-1111-111111111111 scaling_policy_spec.cpu_target.target_avg_percent=70

Logs management commands

Logs provide visibility into the autoscaling group activities and events. You can query logs to understand scaling decisions and troubleshoot issues.

List autoscaling group logs

List logs for a specified autoscaling group to view scaling events and activities.

Usage:

TerminalCode
scw autoscaling logs list <group-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
group-idRequired
page-token
page-size
start-time
end-time
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

List all logs for an autoscaling group

TerminalCode
scw autoscaling logs list 11111111-1111-1111-1111-111111111111

Servers management commands

List the Instances that belong to an autoscaling group.

List autoscaling group servers

List all Instances belonging to a specified autoscaling group.

Usage:

TerminalCode
scw autoscaling servers list <group-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
group-idRequired
page-token
page-size
zoneZone to target. If none is passed will use default zone from the configDefault: fr-par-1
One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3

Examples:

List all servers in an autoscaling group

TerminalCode
scw autoscaling servers list 11111111-1111-1111-1111-111111111111