# at.happyproto.admin.setAutoscalePaused

> Pause or resume the autoscaler. Pausing stops new host requests; one under way carries on. Staff only.

- Kind: procedure
- Authority: admin.happyproto.at
- Lexicon: 1
- Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.setAutoscalePaused)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.setAutoscalePaused/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.setAutoscalePaused/analytics)

## Procedure (`at.happyproto.admin.setAutoscalePaused`)

Type: procedure · POST

### Input (application/json)

- `idempotencyKey` (string, required): A UUID. Repeating a request with the same key replays its answer.
- `paused` (boolean, required)

### Output (application/json)

- `autoscale` (ref, required)
  - Reference: `at.happyproto.admin.defs#autoscale`

### Errors

- `AuthRequired`: This endpoint requires an authenticated caller.
- `Forbidden`: The caller is not HappyProto staff, or the provisioner does not treat them as staff.
- `InvalidRequest`: The input was malformed, or the provisioner refused it as malformed.
- `NotFound`: No such host request.
- `InvalidSlug`: Passed through from the provisioner.
- `SlugTaken`: Passed through from the provisioner.
- `NotEntitled`: Passed through from the provisioner.
- `InstanceLimit`: Passed through from the provisioner.
- `NoCapacity`: Passed through from the provisioner.
- `OperationInProgress`: Passed through from the provisioner.
- `NotRetryable`: Only a failed request can be retried.
- `NotCancellable`: A registered or cancelled request cannot be cancelled.
- `RequestInFlight`: Another host request is under way.
- `ScalerNotConfigured`: The provisioner has no GitHub App to start workflows with.
- `HostRegistered`: The request's host already has a host row: retire it, or set it active and leave the request. The message says which.
- `ConfirmationMismatch`: confirm is not the request's host name.
- `DispatchFailed`: GitHub would not start the workflow. The request is unchanged.
- `Upstream`: The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Pause or resume the autoscaler. Pausing stops new host requests; one under way carries on. Staff only.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not HappyProto staff, or the provisioner does not treat them as staff.",
          "name": "Forbidden"
        },
        {
          "description": "The input was malformed, or the provisioner refused it as malformed.",
          "name": "InvalidRequest"
        },
        {
          "description": "No such host request.",
          "name": "NotFound"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InvalidSlug"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "SlugTaken"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NotEntitled"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InstanceLimit"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NoCapacity"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "OperationInProgress"
        },
        {
          "description": "Only a failed request can be retried.",
          "name": "NotRetryable"
        },
        {
          "description": "A registered or cancelled request cannot be cancelled.",
          "name": "NotCancellable"
        },
        {
          "description": "Another host request is under way.",
          "name": "RequestInFlight"
        },
        {
          "description": "The provisioner has no GitHub App to start workflows with.",
          "name": "ScalerNotConfigured"
        },
        {
          "description": "The request's host already has a host row: retire it, or set it active and leave the request. The message says which.",
          "name": "HostRegistered"
        },
        {
          "description": "confirm is not the request's host name.",
          "name": "ConfirmationMismatch"
        },
        {
          "description": "GitHub would not start the workflow. The request is unchanged.",
          "name": "DispatchFailed"
        },
        {
          "description": "The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.",
          "name": "Upstream"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "idempotencyKey": {
              "description": "A UUID. Repeating a request with the same key replays its answer.",
              "type": "string"
            },
            "paused": {
              "type": "boolean"
            }
          },
          "required": [
            "paused",
            "idempotencyKey"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "autoscale": {
              "ref": "at.happyproto.admin.defs#autoscale",
              "type": "ref"
            }
          },
          "required": [
            "autoscale"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.happyproto.admin.setAutoscalePaused",
  "lexicon": 1
}
```
