fix(ec2,sagemaker): real capacity-reservation split/capacity blocks and model-driven SageMaker describe shapes

Merged
VI
9h ago
+5361-137

Summary

EC2

  • CreateCapacityReservationBySplitting / MoveCapacityToCapacityReservation now move real capacity between reservations instead of echoing synthesized ones. The split destination is a fresh active On-Demand reservation (source config, no tags/history/interruptible allocation) with createDate == startDate == split time. Client tokens replay idempotently.
  • DryRun is answered before any parameter/state check (as EC2 does from the permission check). DryRunOperation (EC2's documented common error, 412) is added to the probe's EC2 accepted-error list.
  • DescribeCapacityBlockOfferings returns real offerings per the user-guide rules (1-14 days in 1-day steps or up to 182 in 7-day steps, 1-64 instances, 11:30 UTC starts within 8 weeks). PurchaseCapacityBlock consumes an offering and creates a scheduled capacity-block reservation. No invented prices.

SageMaker

  • Describe/List outputs are projected from the stored request through the Smithy model (derive.rs, shape.rs): DescribeCluster instance groups as ClusterInstanceGroupDetails (current/desired pairs, InService), inference component DeployedImage + copy counts, human task UI ContentSha256, ProfilingStatus from DisableProfiler, OnDemand feature groups without provisioned units, work team WorkforceArn.
  • Partial updates (*ForUpdate members, generated from the model) merge into stored state instead of replacing it.
  • Required output members are synthesized from each element's own identifiers; intEnum leaves get modelled values; dispatch parses and serializes once.
  • After merging main (batch D, #2728): main's engine owns the Workforce/Workteam wrapper, derive only transforms.

Test plan

  • cargo clippy --workspace --all-targets -D warnings, cargo fmt --check
  • lib: ec2 475, sagemaker 73, conformance 96
  • cargo test -p fakecloud-conformance --test ec2 --test sagemaker
  • e2e: sagemaker (14), ec2_capacity_reservation_split
  • probe run --services sagemaker,ec2: 43106/43106, 1211/1211 ops

No SDK/docs surface change (no new introspection endpoints, op counts unchanged).


Summary by cubic

Makes EC2 capacity-reservation splitting and capacity blocks move real capacity instead of echoing synthesized data, and projects SageMaker read responses through the Smithy model's output shapes instead of echoing the stored request.

EC2

  • CreateCapacityReservationBySplitting and MoveCapacityToCapacityReservation transfer capacity between actual reservations; the split destination is a fresh active On-Demand reservation with no tags or history, and client tokens replay idempotently.
  • DryRun is answered before parameter and state validation, and DryRunOperation is accepted as EC2's documented common error.
  • DescribeCapacityBlockOfferings returns real offerings following the user-guide duration, step, and booking-window rules, and PurchaseCapacityBlock consumes one to create a scheduled capacity-block reservation with no invented prices.

SageMaker

  • Describe/List responses are projected from the stored request through the model's output shape trees: cluster instance groups report current/desired pairs and InService, inference components report deployed images and copy counts, human task UIs report ContentSha256, and ProfilingStatus and On-Demand throughput come from stored state.
  • Partial updates (*ForUpdate members) merge into stored state instead of replacing it, and required output members are synthesized from each element's own identifiers.

No new endpoints or SDK surface changes; operation counts are unchanged.