Skip to content

Detached

@final
class Detached

What another process needs to adopt a VM handed off by Sandbox.detach().

Pass the fields to Sandbox.adopt(region, microvm_id, endpoint, agent_token, port=port). agent_token is a credential: keep it (or to_dict()) in private encrypted storage. It never appears in repr.

Detached declares no __new__ or __init__, so it is not constructed directly: an instance comes back from another call in this package.

agent_token: str

The bearer the VM’s daemon accepts. Store only in a private encrypted record.

endpoint: str

The HTTPS endpoint its daemon answers on.

microvm_id: str

The VM’s identifier.

port: int

The daemon port the endpoint’s proxy tokens are minted for.

region: Region

The region the VM runs in.

def to_dict() -> dict

Every field, token included, as a JSON-safe dict for a private store.

def __repr__() -> str

This page is generated from bindings/microvms-py/microvms.pyi by Griffe 2.3.0, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run stubs. mise run stubs:check fails when the committed file no longer matches the source.