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:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| group-id | ||
| page-token | ||
| page-size | ||
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3 |
Examples:
List all alerts for an autoscaling group
Code
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:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| name | Name of the autoscaling group | Default: <generated> |
| tags.{index} | Tags associated with the group | |
| template-id | Template ID for instances in this group | |
| scaling-policy-spec.minimum-size | Minimum number of instances in the group | Required |
| scaling-policy-spec.maximum-size | Maximum number of instances in the group | Required |
| scaling-policy-spec.scale-out-cooldown | Cooldown period after a scale out event | |
| scaling-policy-spec.scale-in-cooldown | Cooldown period after a scale in event | |
| scaling-policy-spec.scale-in-step | Number of instances to remove in a single scale in event | |
| scaling-policy-spec.scale-out-step | Number 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-id | ID of the load balancer (set to empty to disable) | |
| load-balancer-configuration-spec.backends.{index}.backend-id | ID of the load balancer backend | |
| load-balancer-configuration-spec.backends.{index}.address-family | IP address family (IPv4 or IPv6) | One of: unknown_address_family, ipv4, ipv6 |
| load-balancer-configuration-spec.backends.{index}.private-network-id | Optional private network ID | |
| load-balancer-configuration-spec.auto-healing.enabled | Whether auto-healing is enabled | |
| load-balancer-configuration-spec.auto-healing.grace-period | Grace period for health checks | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3 |
Examples:
Create an autoscaling group with a fixed size
Code
Delete an autoscaling group
Delete a specified autoscaling group and all its associated resources.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| group-id | ID of the group to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3 |
Examples:
Delete a specified autoscaling group
Code
Get an autoscaling group
Get details of a specified autoscaling group including its configuration, current size, and status.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| group-id | ID of the group to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3 |
Examples:
Get a specified autoscaling group
Code
List autoscaling groups
List all autoscaling groups in a project.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| order-by | Order criteria for listing groups | One of: created_at_desc, created_at_asc |
| page-size | Page size for pagination | |
| page-token | Token for pagination | |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| template-id | Template ID to filter groups | |
| load-balancer-id | Load balancer ID to filter groups | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3 |
Examples:
List all autoscaling groups in your default zone
Code
List autoscaling groups filtered by template
Code
List autoscaling groups filtered by load balancer
Code
Update an autoscaling group
Update the configuration of a specified autoscaling group including name, tags, template, scaling policy, and load balancer settings.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| group-id | ID of the group to update | Required |
| name | New name for the group | |
| tags.{index} | New tags for the group | |
| template-id | New template ID for instances | |
| scaling-policy-spec.minimum-size | Minimum number of instances in the group | |
| scaling-policy-spec.maximum-size | Maximum number of instances in the group | |
| scaling-policy-spec.scale-out-cooldown | Cooldown period after a scale out event | |
| scaling-policy-spec.scale-in-cooldown | Cooldown period after a scale in event | |
| scaling-policy-spec.scale-in-step | Number of instances to remove in a single scale in event | |
| scaling-policy-spec.scale-out-step | Number 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-id | ID of the load balancer (set to empty to disable) | |
| load-balancer-configuration-spec.backends.{index}.backend-id | ID of the load balancer backend | |
| load-balancer-configuration-spec.backends.{index}.address-family | IP address family (IPv4 or IPv6) | One of: unknown_address_family, ipv4, ipv6 |
| load-balancer-configuration-spec.backends.{index}.private-network-id | Optional private network ID | |
| load-balancer-configuration-spec.auto-healing.enabled | Whether auto-healing is enabled | |
| load-balancer-configuration-spec.auto-healing.grace-period | Grace period for health checks | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3 |
Examples:
Update the name of an autoscaling group
Code
Update the scaling policy of an autoscaling group
Code
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:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| group-id | Required | |
| page-token | ||
| page-size | ||
| start-time | ||
| end-time | ||
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3 |
Examples:
List all logs for an autoscaling group
Code
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:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| group-id | Required | |
| page-token | ||
| page-size | ||
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3 |
Examples:
List all servers in an autoscaling group
Code