Runtimes
Create, list, and resolve runtimes.
RuntimeManager declaration
Section titled “RuntimeManager declaration”class RuntimeManagerRuntimeManager access
Section titled “RuntimeManager access”This type is created by the SDK; do not construct it directly.
const manager = client.runtimes;RuntimeManager methods
Section titled “RuntimeManager methods”create()
Section titled “create()”Create a runtime and optionally wait until it is ready.
RuntimeManager.create(name?: string | null, options: CreateRuntimeOptions = {}): Promise<Runtime>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
name? | string | null | Optional | Optional display name for the runtime. |
options | CreateRuntimeOptions | {} | Runtime resources, networking, and readiness options. |
Returns
Section titled “Returns”Promise<Runtime>— The newly created runtime handle.
Throws
Section titled “Throws”- ApiError If the control plane rejects the create request.
Examples
Section titled “Examples”const runtime = await client.runtimes.create("worker", { memoryMib: 2048 });Resolve a runtime by UUID or display name.
RuntimeManager.get(id: string): Promise<Runtime>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
id | string | Required | Resource UUID or display name. |
Returns
Section titled “Returns”Promise<Runtime>
list()
Section titled “list()”List runtimes, optionally filtered by lifecycle state.
RuntimeManager.list(status?: string | readonly string[] | null): Promise<Runtime[]>Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
status? | string | readonly string[] | null | Optional | One or more lifecycle states to include. |
Returns
Section titled “Returns”Promise<Runtime[]>— Runtime handles matching the filter.
Examples
Section titled “Examples”const running = await client.runtimes.list("running");for (const runtime of running) console.log(runtime.id, runtime.name);