@finalclass NameRecordOne named VM: everything Sandbox.adopt needs, under a name.
Holds a secret. agent_token is readable so the VM can be adopted, but it stays out of
repr; keep records (and to_dict() output) in private storage.
Constructor
Section titled “Constructor”NameRecord(name: str, microvm_id: str, endpoint: str, agent_token: str, region: Region)A record for a VM this process can already address. Refuses an illegal name or an empty id, endpoint, or token.
Properties
Section titled “Properties”agent_token
Section titled “agent_token”agent_token: strThe VM’s bearer credential. Store only privately; never in repr.
at: intSeconds since the epoch when the name was registered.
egress_posture
Section titled “egress_posture”egress_posture: str | NoneThe launch’s egress posture label, or None when the registering process did not
know it.
endpoint
Section titled “endpoint”endpoint: strmicrovm_id
Section titled “microvm_id”microvm_id: strname: strregion
Section titled “region”region: strThe region the VM runs in, as the record spells it.
tunnel_identity
Section titled “tunnel_identity”tunnel_identity: TunnelIdentity | NoneThe VM’s tunnel identity, when it was launched with identity=True; None otherwise.
Raises when the record carries one half of the pair, or a half that doesn’t decode: the record claims a verifiable VM, and reading it as unverifiable would hide that it’s broken. Holds the host’s secret half, which stays out of this record’s repr.
Methods
Section titled “Methods”for_sandbox
Section titled “for_sandbox”@staticmethoddef for_sandbox(name: str, sandbox: Sandbox) -> NameRecordA record naming the VM sandbox addresses — launched or adopted.
from_dict
Section titled “from_dict”@staticmethoddef from_dict(record: dict) -> NameRecordA record from to_dict() output (or a CLI registry file’s JSON), checked.
to_dict
Section titled “to_dict”def to_dict() -> AnyThe record as a JSON-safe dict with the CLI registry’s camelCase keys, agent token
included — the form to store privately and read back with from_dict.
Special methods
Section titled “Special methods”__eq__
Section titled “__eq__”def __eq__(other: object, /) -> bool__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.