Skip to main content

Module ops

Module ops 

Source
Expand description

The wire shapes, transcribed member-for-member from the pinned service model.

§The honest-fake rule

Every field name here is copied from service-2.json for API version crate::constants::MODEL_API_VERSION, and every deserializer test in this file parses literal JSON in the model’s spelling rather than the output of this module’s own serializer. That is not a style preference; it is the fix for a specific bug that shipped.

MicrovmImageBuildSummary carries a member called buildState. It has no member called state. The Python client read b.get("state"), which returned None from every real response — so the stall probe that is the only thing separating a wedged image from a slow build was dead against live AWS while passing its unit test, because the test’s fake returned {"state": "PENDING"}. The fake shared the client’s own misreading, so the two agreed with each other and with nothing else. Found 2026-08-07 by diffing against the service model, after a ~15-hour wedge that this guard existed to catch and did not.

A round-trip test through this module’s Serialize would have exactly the same blind spot. So the tests below hold JSON.

§What is Option and what is not

The model’s required list, not a guess about what the service usually sends. A member the model marks required is a bare field; everything else is Option. Two consequences worth stating:

  • stateReason is optional everywhere it appears, which is why TRAP-8’s error says “no stateReason” rather than printing an empty string — the absence is information.
  • RunMicrovmRequest requires only imageIdentifier. executionRoleArn is optional on the wire even though every real launch needs one.

§Unknown members are dropped, deliberately

No #[serde(deny_unknown_fields)] and no catch-all map. A member AWS adds to a response must not fail a deserialization — that would turn an additive service change into a broken client — and this crate has no consumer for a field it does not know about. The drift gate (TRAP-12) is where a new member gets noticed.

Structs§

AllPorts
AllPorts, which the model declares with no members.
CloudWatchLogging
CloudWatchLogging: the group and stream names, both optional in the model.
CodeArtifact
CodeArtifact, a union whose only member this client uses is uri.
CpuConfiguration
CpuConfiguration. One required member, whose enum has one value (ARM_64).
CreateAuthTokenResponseWire
CreateMicrovmAuthTokenResponse.
CreateAuthTokenWire
CreateMicrovmAuthTokenRequest’s body members. microvmIdentifier is a URI parameter and so is not in the body.
CreateMicrovmImageResponseWire
CreateMicrovmImageResponse, narrowed to the members this client reads.
CreateMicrovmImageWire
CreateMicrovmImageRequest.
CreateShellAuthTokenResponseWire
CreateMicrovmShellAuthTokenResponse.
CreateShellAuthTokenWire
CreateMicrovmShellAuthTokenRequest’s body members. microvmIdentifier is a URI parameter and so is not in the body.
DeleteImageResponseWire
DeleteMicrovmImageOutput.
GetImageBuildResponseWire
GetMicrovmImageBuildOutput, which is MicrovmImageBuildSummary plus one member.
GetMicrovmImageResponseWire
GetMicrovmImageOutput.
Hooks
Hooks.
IdlePolicy
IdlePolicy. All three members are required by the model, in both directions.
ListImageBuildsResponseWire
ListMicrovmImageBuildsOutput.
ListImageVersionsResponseWire
ListMicrovmImageVersionsOutput.
ListImagesResponseWire
ListMicrovmImagesResponse.
ListManagedImagesResponseWire
ListManagedMicrovmImagesOutput.
ListManagedVersionsResponseWire
ListManagedMicrovmImageVersionsOutput.
ListMicrovmsResponseWire
ListMicrovmsResponse.
LoggingDisabled
LoggingDisabled, which the model declares with no members. See AllPorts for why this is an empty struct rather than a unit one.
ManagedMicrovmImageSummaryWire
ManagedMicrovmImageSummary: an ARN and two timestamps, and that is all the model declares.
ManagedMicrovmImageVersionWire
ManagedMicrovmImageVersion. Three required members and one optional.
MicrovmHooks
MicrovmHooks — the family that caps at 60 seconds.
MicrovmImageBuildSummaryWire
MicrovmImageBuildSummary.
MicrovmImageHooks
MicrovmImageHooks — the build family, capping at 3600 seconds.
MicrovmImageSummaryWire
MicrovmImageSummary, narrowed to the members name resolution reads.
MicrovmImageVersionSummaryWire
MicrovmImageVersionSummary, which is also GetMicrovmImageVersionOutput and UpdateMicrovmImageVersionResponse — the three shapes are member-for-member identical in the model, so one type serves all of them.
MicrovmItemWire
MicrovmItem — the list shape, which is narrower than GetMicrovmResponse: it carries no endpoint and no stateReason.
MicrovmResponseWire
RunMicrovmResponse and GetMicrovmResponse — identical in every member this client reads, so one type serves both.
MicrovmSummaryWire
A list item with optional timestamp metadata. The original MicrovmItemWire remains unchanged so downstream Rust code can keep constructing its published fields.
PortRange
PortRange. Inclusive at both ends, per the model’s min: 1, max: 65535 on each.
Resources
Resources — note the plural. The model’s ResourcesList member shape is Resources, not Resource; there is no shape called Resource at all.
RunMicrovmWire
RunMicrovmRequest.
ServiceErrorWire
The modeled error shapes, which all carry a message and several add fields.
SnapshotBuild
SnapshotBuild: the three byte counts, each optional in the model.
UpdateImageVersionWire
UpdateMicrovmImageVersionRequest’s one body member.

Enums§

HookState
HookState, the model’s two values.
Logging
Logging, the model’s tagged union: exactly one of disabled or cloudWatch.
PortSpecification
PortSpecification, the model’s tagged union: one port, a range, or all of them.
VersionStatus
MicrovmImageVersionStatus, the model’s two values.