hangar pause
Pause a Hangar, keeping its disk.
Stops a Hangar's machine and keeps its disk. Everything running in its terminal stops,
agents included, and anyone connected is disconnected. Files under /home/hangar stay
where they were, and so do its ports, its variables and its idle timeout.
While it is paused, hangar connect and hangar restart are refused, and hangar resume
starts it again on a new machine in under a minute. A Hangar with an idle timeout is paused
the same way on its own once its terminal has been idle that long. See
hangar update.
Usage
outplane hangar pause <HANGAR>Arguments
| Argument | Type | Description |
|---|---|---|
HANGAR | string | Hangar name or id. Required. |
Output
| Field | Type | Description |
|---|---|---|
hangar | string | The Hangar's immutable name. |
hangarId | string | |
paused | bool | The state the Hangar is now in. |
changed | bool | False when it was already in that state, and for a dry run. |
Examples
See what it would do, without sending it
outplane hangar pause myhangar --dry-run --json{
"changed": false,
"hangar": "myhangar",
"paused": true
}Pause a Hangar
outplane hangar pause myhangarPause one and read the result in a pipeline
outplane hangar pause myhangar --json --fields paused,changed{
"changed": true,
"paused": true
}Pause one in another team
outplane hangar pause myhangar --team acmeWhat to Know
- Idempotent. Pausing a Hangar that is already paused sends nothing, reports changed false and exits 0.
- Files under /home/hangar, its ports, its variables and its idle timeout are kept either way.
- Everything running in its terminal stops, agents included, and anyone connected is disconnected. Work that exists only in a running process is gone; files on the disk are not.
- While it is paused, its status reads paused,
hangar connectandhangar restartexit 6 with hangar.not_running, andhangar metricsreports null CPU and memory, not 0. - With an idle timeout, the platform checks every 5 minutes and pauses a Hangar whose terminal has had no output in any window and no key from anyone connected for that long, so 30m pauses it 30 to 35 minutes after the last activity. A paused Hangar keeps its disk, its ports and its variables, and
outplane hangar resumestarts it again. - Exit 6 with hangar.never_started means the Hangar has no machine to stop or start. retryable is true while it is still starting for the first time; otherwise deleting it and creating it again is the way back.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
6 | conflict | The resource already exists, or a concurrent change won. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of hangar.never_started, hangar.not_found, hangar.ambiguous, usage.missing_argument, usage.empty_argument, context.no_team. Branch on that, or on the exit status. The message is prose and changes.