Skip to content

Runtimes

Create, list, and resolve runtimes.

class RuntimeManager

This type is created by the SDK; do not construct it directly.

const manager = client.runtimes;

Create a runtime and optionally wait until it is ready.

RuntimeManager.create(name?: string | null, options: CreateRuntimeOptions = {}): Promise<Runtime>
NameTypeDefaultDescription
name?string | nullOptionalOptional display name for the runtime.
optionsCreateRuntimeOptions{}Runtime resources, networking, and readiness options.
  • Promise<Runtime> — The newly created runtime handle.
  • ApiError If the control plane rejects the create request.
const runtime = await client.runtimes.create("worker", { memoryMib: 2048 });

Resolve a runtime by UUID or display name.

RuntimeManager.get(id: string): Promise<Runtime>
NameTypeDefaultDescription
idstringRequiredResource UUID or display name.
  • Promise<Runtime>

List runtimes, optionally filtered by lifecycle state.

RuntimeManager.list(status?: string | readonly string[] | null): Promise<Runtime[]>
NameTypeDefaultDescription
status?string | readonly string[] | nullOptionalOne or more lifecycle states to include.
  • Promise<Runtime[]> — Runtime handles matching the filter.
const running = await client.runtimes.list("running");
for (const runtime of running) console.log(runtime.id, runtime.name);