@finalclass DetachedWhat 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.
Constructor
Section titled “Constructor”Detached declares no __new__ or __init__, so it is not constructed directly: an instance comes back from another call in this package.
Properties
Section titled “Properties”agent_token
Section titled “agent_token”agent_token: strThe bearer the VM’s daemon accepts. Store only in a private encrypted record.
endpoint
Section titled “endpoint”endpoint: strThe HTTPS endpoint its daemon answers on.
microvm_id
Section titled “microvm_id”microvm_id: strThe VM’s identifier.
port: intThe daemon port the endpoint’s proxy tokens are minted for.
region
Section titled “region”region: RegionThe region the VM runs in.
Methods
Section titled “Methods”to_dict
Section titled “to_dict”def to_dict() -> dictEvery field, token included, as a JSON-safe dict for a private store.
Special methods
Section titled “Special methods”__repr__
Section titled “__repr__”def __repr__() -> strProvenance
Section titled “Provenance”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.