---
title: "ezgh compute autoscaling-groups update"
description: "Change an autoscaling group's size, policies, timings or target groups."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh compute autoscaling-groups update

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh compute autoscaling-groups update <group> [--min n] [--max n] [--desired n] [policy flags] [timing flags] [--target-group tgp_…]... [--clear-target-groups] [flags]
```

Change a group's size, policies, timings or target groups; the launch spec has its own command (`ezgh compute autoscaling-groups set-launch-spec`). Policies are merged by name over the current ones: `--cpu-target` sets the policy cpu, `--memory-target` the policy memory, `--promql-policy` sets the policy it names, and `--remove-policy` drops one. The `--target-group` list (repeat, at most 5) replaces the current one, and `--clear-target-groups` detaches them all; each target group added needs lb.targetGroups.registerTargets and lb.targetGroups.deregisterTargets. The change is conditional on the group being as it was read.

Needs compute.autoscalingGroups.update.

Part of [`ezgh compute autoscaling-groups`](/cli/reference/compute-autoscaling-groups).

## Examples

```sh
ezgh compute autoscaling-groups update web --max 20 --cpu-target 50
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--batch-percent` | int |  | the share of the group a release replaces at a time, 1–100 (default 25) |
| `--clear-target-groups` | boolean |  | detach every target group |
| `--cpu-target` | string |  | keep the members' average CPU utilization at this percentage (policy cpu) |
| `--desired` | int |  | how many instances the group aims for, between `--min` and `--max` (default on create: `--min`) |
| `--health-check-grace` | int |  | seconds before a new member's health is judged (default 300) |
| `--instance-warmup` | int |  | seconds before a new member's metrics count (default 300) |
| `--max` | int |  | the most instances the group runs (at most 100) |
| `--memory-target` | string |  | keep the members' average memory utilization at this percentage (policy memory) |
| `--min` | int |  | the fewest instances the group keeps (0–100) |
| `--promql-policy` | string, repeatable |  | a policy on a PromQL query: name=&lt;name&gt;,target=&lt;target&gt;,query=&lt;query&gt;; the query comes last and takes the rest of the value (repeat) |
| `--remove-policy` | string, repeatable |  | remove the policy with this name (repeat) |
| `--scale-in-cooldown` | int |  | seconds a smaller size must hold before the group scales in (default 300) |
| `--target-group` | string, repeatable |  | a target group (tgp\_…) the members are registered in, at most 5; repeat for more. The list replaces the current one |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/compute-autoscaling-groups-update/index.mdx
