fakecloud_amplify/lib.rs
1//! AWS Amplify (`amplify`) restJson1 control plane for fakecloud.
2//!
3//! The full 37-operation AWS Amplify Smithy model: apps (`CreateApp` /
4//! `GetApp` / `ListApps` / `UpdateApp` / `DeleteApp`), branches, domain
5//! associations (with the `CREATING` -> `AVAILABLE` verification lifecycle),
6//! webhooks, backend environments, the deterministic job/deployment lifecycle
7//! (`StartJob` / `GetJob` / `ListJobs` / `StopJob` / `DeleteJob` +
8//! `CreateDeployment` / `StartDeployment`), build artifacts
9//! (`ListArtifacts` / `GetArtifactUrl`), access-log generation, and
10//! ARN-keyed resource tagging (`TagResource` / `UntagResource` /
11//! `ListTagsForResource`).
12//!
13//! Amplify signs SigV4 with the `amplify` scope and speaks restJson1: requests
14//! are routed to an operation by HTTP method + `@http` URI path
15//! (`POST /apps`, `GET /apps/{appId}`, `POST /apps/{appId}/branches`,
16//! `DELETE /apps/{appId}/branches/{branchName}/jobs/{jobId}/stop`, ...); path
17//! labels are captured positionally and percent-decoded (so an ARN label whose
18//! slashes arrive percent-encoded survives intact), and query parameters are
19//! read from the raw query string.
20//!
21//! Everything is real, persisted, account-partitioned state: every
22//! `CreateApp` / `CreateBranch` / `CreateDomainAssociation` is reflected by its
23//! `Get*` / `List*`, every `Delete*` deletes, and the async domain/job
24//! lifecycles are modelled by advancing the stored status on the next read
25//! (with in-flight transitions reconciled on restart). Amplify is a hosting
26//! control plane; there is no separately-emulable data plane (the built app
27//! artifacts are produced by a real CI/CD build farm), so job builds settle
28//! deterministically rather than executing a customer's build.
29
30pub mod persistence;
31pub mod service;
32pub mod shared;
33pub mod state;
34mod validate;
35
36pub use service::{AmplifyService, AMPLIFY_ACTIONS};
37pub use state::{
38 AmplifyData, AmplifySnapshot, SharedAmplifyState, AMPLIFY_SNAPSHOT_SCHEMA_VERSION,
39};