AsyncRuntimeManager
Creates, lists, and resolves runtimes asynchronously.
Async · Sync counterpart:
RuntimeManager
AsyncRuntimeManager declaration
Section titled “AsyncRuntimeManager declaration”class AsyncRuntimeManager(_SdkOwnedHandle):AsyncRuntimeManager access
Section titled “AsyncRuntimeManager access”This type is created by the SDK; do not construct it directly.
manager = client.runtimesAsyncRuntimeManager methods
Section titled “AsyncRuntimeManager methods”list()
Section titled “list()”List runtimes, optionally filtered by lifecycle state.
async def list(status: str | Sequence[str] | None = None) -> list[AsyncRuntime]Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
status | str | Sequence[str] | None | None | Optional lifecycle status filter. |
Returns
Section titled “Returns”list[AsyncRuntime]
create()
Section titled “create()”Create a runtime and optionally wait until it is ready.
async 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) -> AsyncRuntimeParameters
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”AsyncRuntime— The newly created asynchronous 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 = await client.runtimes.create(name="worker", memory_mib=2048)>>> await runtime.status()<RuntimeStatus.RUNNING: 'running'>Resolve a runtime by UUID or display name.
async def get(id: str) -> AsyncRuntimeParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
id | str | — | Resource UUID or display name. |
Returns
Section titled “Returns”AsyncRuntime