runtime_sandboxes_manage
stop: end it and its compute charges, keeping its disk (billed as paused storage) for restart. delete: stop it, delete its disk and paused memory, revoke its previews and ports, and remove it from lists for good (its snapshots stay). pause: keep memory and disk, stop compute charges. wake: continue a paused one (seconds: its new time limit, if it has one; no_capacity means retry); a paused one with autoWake also wakes by itself on the next exec, file, terminal or preview request. extend: seconds more for one with a time limit (one without needs none). retention: days (1 to 365) a paused or stopped one is kept; null, the default, keeps it while your account has credit. persist: policy {persistent, maxTotalCostMicros?} keeps it running until stopped, never idle-paused. restart: start a stopped one from its disk. switch-image: move it to image, keeping only /workspace (its home), volumes, env, name and previews; processes restart and everything else on its disk is lost (snapshot first to keep everything); undone if anything fails. update: change name, labels, env (values are never shown again), autoWake, wakeOnTimers, user, idlePauseSeconds (counted from the last activity), timeoutSeconds or onTimeout. resize: diskMiB alone grows a running one's disk live, nothing restarted; vcpu and/or memoryMiB change by a restart on its own server; the whole disk stays and every running program stops (a paused one's memory is discarded); no_capacity means its server has no room for the new size, and nothing changed. Waits until done.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| env | No | update: environment for every later command; a value sets a variable, null removes it. | |
| days | No | retention: days to keep a paused sandbox, or null to keep it while your account has credit. | |
| keep | No | switch-image: optional, only "workspace", the only thing a switch keeps; older clients send it. | |
| name | No | update: a new name, unique in the account. | |
| user | No | update: who later commands and terminals run as when they name no one. | |
| vcpu | No | resize: the new vCPUs, 1 to 16 (without credit 2). | |
| wait | No | Wait until the change is done (default). | |
| image | No | switch-image: the image to move to: id, name, name:tag or name@version. | |
| action | Yes | ||
| labels | No | Your own key/value tags, at most 32. Filter lists with label=key:value. | |
| policy | No | ||
| diskMiB | No | resize: the new disk in MiB, only larger, at most 409600 (without credit 10240); asked alone of a running sandbox it grows live, otherwise at the restart. | |
| restart | No | resize: optional; false grows a running sandbox's disk live or refuses, never restarting (diskMiB alone). | |
| seconds | No | extend: move its time limit this many seconds later. wake: its new time limit, for a sandbox that has one. | |
| autoWake | No | update: whether a request wakes it when paused. | |
| memoryMiB | No | resize: the new memory in MiB, 128 to 65536 (without credit 4096). | |
| onTimeout | No | update: what its time limit's end does. | |
| wakeOnTimers | No | update: whether a process's timer wakes it from an idle pause. | |
| idempotencyKey | No | Optional: left out, one is made and returned as idempotencyKey. Send it back only to retry this exact call after a temporary error. | |
| timeoutSeconds | No | update: a new time limit from now, 60 to 86400 seconds, sooner or later than before; 0 removes it. | |
| idlePauseSeconds | No | update: pause after this many idle seconds, 60 to 86400 (a shorter time raised to 60); 0 never. |