Create a sandbox
The TypeScript SDK adds camelCase aliases (
milliCpu, memMb, createdAt)
alongside the raw API fields, so either spelling works.
Run a command
/bin/sh -c, so pipes and && work. Pass an
array instead to execute a program directly without a shell:
exitCode yourself;
only transport and API failures raise RunCloudError. Exec requires the sandbox
to be running; a paused sandbox returns 409.
List and inspect
Name a sandbox
A name is a label you choose. Set it at create, change it later, and filter on it withlist. Nothing on the platform reads it, and names are not unique — two
sandboxes may share one.
destroyed (which returns 409), so a
paused sandbox can be re-labelled without resuming it. Names are capped at 128
characters, and an empty name clears the label.
Renaming an exposed sandbox does not move its public hostname. The
<name>-box.run.cloud prefix is fixed when you first expose the sandbox; to
change it, destroy the sandbox and expose a new one.stopped or archived rather than ready — so check state before you
use the result.
Destroy
try/finally so
a thrown error still tears the sandbox down: