# manage-runners runner autoscaling set

> Create or change a runner's scaling policy, which adds paid Hetzner or DigitalOcean burst runners while the runner is busy; unchanged settings and omitted tokens are kept

Source: https://managerunners.com/docs/cli/reference/runner-autoscaling-set/

| | |
| --- | --- |
| Required scopes | `runners:read`, `runners:write` |
| Required flags | none |
| Changes state | yes |
| Destructive | no |
| Paid resource effect | `create` |
| Confirmation | `paid_resource` |
| Non-interactive use | supported |

> This command may create paid Hetzner or DigitalOcean resources. Read [confirmations](https://managerunners.com/docs/cli/agents/#confirmations) before running it non-interactively.

## Usage

```text
Create or change a runner's scaling policy, which adds paid Hetzner or DigitalOcean burst runners while the runner is busy; unchanged settings and omitted tokens are kept

Usage:
  manage-runners runner autoscaling set [flags]

Flags:
      --cache string                     S3 cache id or name for burst runners (external GitLab anchors); a name needs runners:read
      --concurrency int                  burst runner concurrency, 1 to 100, for GitHub runners 1 to 32 (external anchors)
      --digitalocean-connection string   DigitalOcean connection id for burst runners on DigitalOcean instead of --provider-token-env (external anchors, and runners whose burst runners use DigitalOcean as another provider); see provider digitalocean connections
      --enabled[=true|false]             whether the policy scales; a new policy is enabled unless --enabled=false; an existing one keeps its state (default true)
      --executor string                  burst runner executor: docker, dind or shell (external GitLab anchors)
      --github-owner string              GitHub user or organization the burst runners register with, the anchor's (external GitHub anchors); with --github-repository and --github-runner-group it replaces the stored scope
      --github-repository string         GitHub repository of the owner (external GitHub anchors); omit for an organization runner
      --github-runner-group string       runner group of an organization runner (external GitHub anchors); omit for the default group
      --github-token-env string          environment variable containing a fine-grained GitHub token for the burst runners (external GitHub anchors): Administration read and write for a repository, Self-hosted runners read and write for an organization; omit it to keep the stored token
      --gitlab-host string               GitLab host the burst runners register with (external GitLab anchors)
      --hetzner-token string             saved Hetzner token id for burst runners on Hetzner instead of --hetzner-token-env (external anchors, and runners whose burst runners use Hetzner as another provider); see provider hetzner tokens
      --hetzner-token-env string         environment variable containing the Hetzner token for burst runners (external anchors, and runners whose burst runners use Hetzner as another provider); omit it to keep the stored token
      --id string                        anchor id: a runner or an external runner
      --label stringArray                burst runner label (external anchors), for GitHub runners also its GitHub label; repeat for several; the given labels replace all, and --label '' removes them
      --location string                  burst runner location of the cloud provider (external anchors, and runners whose burst runners use another provider)
      --max int                          maximum burst runners, 1 to 20; required for a new policy
      --name string                      exact runner or external runner name
      --no-cache[=true|false]            burst runners use no cache (external GitLab anchors)
      --no-send-to[=true|false]          burst runners send to no Metrics connection (external anchors)
      --preset string                    scale on free job slots like the dashboard's presets: eager (add when at most 1 job slot is free for 2 min; for anchors with 2 or more job slots), balanced (none free for 3 min) or conservative (none free for 5 min); replaces the rules
      --product-id string                burst runner product (external anchors, and runners whose burst runners use another provider)
      --profile string                   configuration profile
      --provider string                  cloud provider of the burst runners: hetzner|digitalocean; omit it to keep the stored provider, for a new policy the runner's own, or hetzner for an external runner; on the runner's own provider they copy the runner, another provider needs --product-id, --location and its token
      --provider-token-env string        environment variable containing the cloud provider's token for burst runners (external anchors, and runners whose burst runners use another provider); omit it to keep the stored token; a DigitalOcean token needs the custom scopes account:read, droplet:create, droplet:read, droplet:update, droplet:delete, image:read, reserved_ip:create, reserved_ip:read, reserved_ip:update, reserved_ip:delete, ssh_key:read and tag:create
      --rule stringArray                 custom rule, one per metric, up to 3; replaces the rules. free:K:MINUTES adds burst runners when at most K (0-20) job slots are free for MINUTES (2-60) and removes one when more than K would stay free without it or when the group ran no job for the scale-in window; cpu:OUT:MINUTES:IN or memory:OUT:MINUTES:IN adds them when usage stays at or above OUT% (1-100) for MINUTES and removes them when it would stay below IN% (lower than OUT); for example free:0:3 or cpu:80:5:30
      --runner-token-env string          environment variable containing the anchor's GitLab runner authentication token (external GitLab anchors); omit it to keep the stored token
      --scale-in-window int              minutes the load must stay low before a burst runner is removed, 1 to 120 (new policy: 10)
      --send-to string                   Metrics connection id or name burst runners send to (external anchors); a name needs runners:read
      --ssh-key stringArray              SSH key id or name of the cloud provider for burst runners (external anchors, and runners whose burst runners use another provider); a name is looked up with --hetzner-token-env, --provider-token-env, --digitalocean-connection or --hetzner-token, which needs providers:ssh-keys:read, or else with the stored token; repeat for several; the given keys replace all, and --ssh-key '' removes them
      --stabilization int                minutes to wait after a burst runner became ready before adding more, 0 to 60 (new policy: 3)
      --step int                         burst runners added per step, 1 to 5 (new policy: 1)
      --yes[=true|false]                 confirm that the policy may create paid burst runners
```

Every command also accepts the [global flags](https://managerunners.com/docs/cli/reference/#global-flags). For machine-readable help, run `manage-runners help runner autoscaling set --output json`.
