Skip to content

RuntimeManager

Creates, lists, and resolves runtimes for a synchronous client.

Sync · Async counterpart: AsyncRuntimeManager

class RuntimeManager(_SdkOwnedHandle):

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

manager = client.runtimes

List runtimes, optionally filtered by lifecycle state.

def list(status: str | Sequence[str] | None = None) -> list[Runtime]
Name Type Default Description
status str | Sequence[str] | None None Optional lifecycle status filter.
  • list[Runtime]

Create a runtime and optionally wait until it is ready.

def create(name: str | None = None, *, checkpoint_id: str | None = None, vcpus: int = 1, memory_mib: int = 1024, memory_max_mib: int | None = None, resources: CreateRuntimeResources | Mapping[str, object] | None = None, ingress_specs: Sequence[IngressSpec | Mapping[str, object]] | None = None, egress_policy: EgressPolicy | None = None, idle_suspend_after_secs: int | None = None, runtime_agent: str | None = None, wait: bool = True, timeout: float = 240.0, poll_interval: float = 0.5) -> Runtime
Name Type Default Description
name str | None None Optional display name for the runtime.
checkpoint_id str | None None Checkpoint UUID to restore into the new runtime.
vcpus int 1 Requested virtual CPU count when resources is not supplied.
memory_mib int 1024 Requested memory in MiB when resources is not supplied.
memory_max_mib int | None None Optional maximum memory allocation in MiB.
resources CreateRuntimeResources | Mapping[str, object] | None None Structured resource requests and limits.
ingress_specs Sequence[IngressSpec | Mapping[str, object]] | None None Ports and protocols to expose from the runtime.
egress_policy EgressPolicy | None None Initial outbound network policy.
idle_suspend_after_secs int | None None Idle time before automatic suspension.
runtime_agent str | None None Optional runtime-agent version or channel.
wait bool True Wait until the runtime is ready before returning.
timeout float 240.0 Maximum number of seconds to wait for readiness.
poll_interval float 0.5 Seconds between readiness checks.
  • Runtime — The newly created runtime handle.
  • ApiError — If the control plane rejects the create request.
  • TimeoutError — If wait is true and the runtime is not ready in time.
>>> runtime = client.runtimes.create(name="worker", memory_mib=2048)
>>> runtime.status()
<RuntimeStatus.RUNNING: 'running'>

Resolve a runtime by UUID or display name.

def get(id: str) -> Runtime
Name Type Default Description
id str Resource UUID or display name.
  • Runtime