RuntimeManager
Creates, lists, and resolves runtimes for a synchronous client.
Sync · Async counterpart:
AsyncRuntimeManager
RuntimeManager declaration
Section titled “RuntimeManager declaration”class RuntimeManager(_SdkOwnedHandle):RuntimeManager access
Section titled “RuntimeManager access”This type is created by the SDK; do not construct it directly.
manager = client.runtimesRuntimeManager methods
Section titled “RuntimeManager methods”list()
Section titled “list()”List runtimes, optionally filtered by lifecycle state.
def list(status: str | Sequence[str] | None = None) -> list[Runtime]Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
status | str | Sequence[str] | None | None | Optional lifecycle status filter. |
Returns
Section titled “Returns”list[Runtime]
create()
Section titled “create()”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) -> RuntimeParameters
Section titled “Parameters”| 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. |
Returns
Section titled “Returns”Runtime— The newly created runtime handle.
Raises
Section titled “Raises”ApiError— If the control plane rejects the create request.TimeoutError— Ifwaitis true and the runtime is not ready in time.
Examples
Section titled “Examples”>>> 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) -> RuntimeParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
id | str | — | Resource UUID or display name. |
Returns
Section titled “Returns”Runtime