Skip to content

ControlPlane

MicroVM lifecycle by ID (get, list, suspend, resume, terminate, and wait) and image administration (list, delete, versions and their status, builds).

Holds no lifecycle state, so it checks nothing a Sandbox would (STATE-5, STATE-7). Use it when a process has only an identifier.

get region(): string;

The region this plane addresses.

string

deleteImage(identifier: string, options?: DeleteImageOptions | null): Promise<boolean>;

Deletes the image, its extra versions first, retrying while it refuses (an image still CREATING, or one a terminating VM holds).

Resolves true once the service took the deletion and false when every attempt failed or identifier is not one the service accepts. It doesn’t reject, as a teardown’s delete shouldn’t.

Parameter Type
identifier string
options? DeleteImageOptions | null

Promise<boolean>


get(microvmId: string): Promise<Microvm>;

GetMicrovm.

Parameter Type
microvmId string

Promise<Microvm>


getImageBuild(
identifier: string,
version: string,
buildId: string
): Promise<ImageBuild>;

GetMicrovmImageBuild: one build, with the snapshot sizes the listing doesn’t carry.

Parameter Type
identifier string
version string
buildId string

Promise<ImageBuild>


list(options?: ListMicrovmsOptions | null): Promise<MicrovmSummary[]>;

ListMicrovms, every page, optionally narrowed to one image and version.

Parameter Type
options? ListMicrovmsOptions | null

Promise<MicrovmSummary[]>


listImageBuilds(identifier: string, version: string): Promise<ImageBuild[]>;

ListMicrovmImageBuilds for one version, every page: one build per Graviton generation. Each buildId is what getImageBuild takes.

Parameter Type
identifier string
version string

Promise<ImageBuild[]>


listImages(): Promise<ImageSummary[]>;

ListMicrovmImages, every page: every image in the account and region.

Promise<ImageSummary[]>


listImageVersions(identifier: string): Promise<ImageVersion[]>;

ListMicrovmImageVersions, every page: each version, its status, and its build configuration.

Parameter Type
identifier string

Promise<ImageVersion[]>


resume(microvmId: string): Promise<void>;

ResumeMicrovm. Resolves once accepted; waitForState for RUNNING. A VM that ended before the resume, whatever ended it, rejects with ERR_WINDOW_CLOSED (STATE-12).

Parameter Type
microvmId string

Promise<void>


setImageVersionStatus(
identifier: string,
version: string,
status: string
): Promise<ImageVersion>;

UpdateMicrovmImageVersion: status is "ACTIVE" or "INACTIVE".

INACTIVE is the non-destructive retire: RunMicrovm refuses the version, running VMs keep running, and the version’s readback stays. Resolves with the readback, and rejects when it doesn’t carry the status asked for, so a 200 that didn’t take isn’t a rollback.

Parameter Type
identifier string
version string
status string

Promise<ImageVersion>


suspend(microvmId: string): Promise<void>;

SuspendMicrovm. Resolves once accepted; waitForState for SUSPENDED.

Parameter Type
microvmId string

Promise<void>


sweep(prefix: string, options?: SweepOptions | null): Promise<SweepReport>;

Discover prefix-matched images and their VMs; set dryRun false to clean them up. Keep entries preserve an exact image name or ARN and every VM using it.

Parameter Type
prefix string
options? SweepOptions | null

Promise<SweepReport>


terminate(microvmId: string): Promise<void>;

TerminateMicrovm. Resolves once accepted; waitForState for TERMINATED.

Parameter Type
microvmId string

Promise<void>


waitForState(
microvmId: string,
wanted: string[],
options?: WaitForStateOptions | null
): Promise<Microvm>;

Polls GetMicrovm until the state is one of wanted.

Reaching one of failOn first rejects naming the state and stateReason; running past timeout rejects with a timeout.

Parameter Type
microvmId string
wanted string[]
options? WaitForStateOptions | null

Promise<Microvm>


static create(region: Region, retry?: RetryOptions | null): Promise<ControlPlane>;

Resolves credentials for region from the default chain. A factory because credential resolution is async.

Parameter Type
region Region
retry? RetryOptions | null

Promise<ControlPlane>

This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, 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 dts. mise run dts:check fails when the committed file no longer matches the source.