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:
stateReasonis optional everywhere it appears, which is why TRAP-8’s error says “no stateReason” rather than printing an empty string — the absence is information.RunMicrovmRequestrequires onlyimageIdentifier.executionRoleArnis 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.- Cloud
Watch Logging CloudWatchLogging: the group and stream names, both optional in the model.- Code
Artifact CodeArtifact, a union whose only member this client uses isuri.- CpuConfiguration
CpuConfiguration. One required member, whose enum has one value (ARM_64).- Create
Auth Token Response Wire CreateMicrovmAuthTokenResponse.- Create
Auth Token Wire CreateMicrovmAuthTokenRequest’s body members.microvmIdentifieris a URI parameter and so is not in the body.- Create
Microvm Image Response Wire CreateMicrovmImageResponse, narrowed to the members this client reads.- Create
Microvm Image Wire CreateMicrovmImageRequest.- Create
Shell Auth Token Response Wire CreateMicrovmShellAuthTokenResponse.- Create
Shell Auth Token Wire CreateMicrovmShellAuthTokenRequest’s body members.microvmIdentifieris a URI parameter and so is not in the body.- Delete
Image Response Wire DeleteMicrovmImageOutput.- GetImage
Build Response Wire GetMicrovmImageBuildOutput, which isMicrovmImageBuildSummaryplus one member.- GetMicrovm
Image Response Wire GetMicrovmImageOutput.- Hooks
Hooks.- Idle
Policy IdlePolicy. All three members are required by the model, in both directions.- List
Image Builds Response Wire ListMicrovmImageBuildsOutput.- List
Image Versions Response Wire ListMicrovmImageVersionsOutput.- List
Images Response Wire ListMicrovmImagesResponse.- List
Managed Images Response Wire ListManagedMicrovmImagesOutput.- List
Managed Versions Response Wire ListManagedMicrovmImageVersionsOutput.- List
Microvms Response Wire ListMicrovmsResponse.- Logging
Disabled LoggingDisabled, which the model declares with no members. SeeAllPortsfor why this is an empty struct rather than a unit one.- Managed
Microvm Image Summary Wire ManagedMicrovmImageSummary: an ARN and two timestamps, and that is all the model declares.- Managed
Microvm Image Version Wire ManagedMicrovmImageVersion. Three required members and one optional.- Microvm
Hooks MicrovmHooks— the family that caps at 60 seconds.- Microvm
Image Build Summary Wire MicrovmImageBuildSummary.- Microvm
Image Hooks MicrovmImageHooks— the build family, capping at 3600 seconds.- Microvm
Image Summary Wire MicrovmImageSummary, narrowed to the members name resolution reads.- Microvm
Image Version Summary Wire MicrovmImageVersionSummary, which is alsoGetMicrovmImageVersionOutputandUpdateMicrovmImageVersionResponse— the three shapes are member-for-member identical in the model, so one type serves all of them.- Microvm
Item Wire MicrovmItem— the list shape, which is narrower thanGetMicrovmResponse: it carries noendpointand nostateReason.- Microvm
Response Wire RunMicrovmResponseandGetMicrovmResponse— identical in every member this client reads, so one type serves both.- Microvm
Summary Wire - A list item with optional timestamp metadata. The original
MicrovmItemWireremains unchanged so downstream Rust code can keep constructing its published fields. - Port
Range PortRange. Inclusive at both ends, per the model’smin: 1, max: 65535on each.- Resources
Resources— note the plural. The model’sResourcesListmember shape isResources, notResource; there is no shape calledResourceat all.- RunMicrovm
Wire RunMicrovmRequest.- Service
Error Wire - The modeled error shapes, which all carry a
messageand several add fields. - Snapshot
Build SnapshotBuild: the three byte counts, each optional in the model.- Update
Image Version Wire UpdateMicrovmImageVersionRequest’s one body member.
Enums§
- Hook
State HookState, the model’s two values.- Logging
Logging, the model’s tagged union: exactly one ofdisabledorcloudWatch.- Port
Specification PortSpecification, the model’s tagged union: one port, a range, or all of them.- Version
Status MicrovmImageVersionStatus, the model’s two values.