Skip to main content

fakecloud_support/
lib.rs

1//! AWS Support (`support`) awsJson1_1 service for fakecloud.
2//!
3//! The full 16-operation AWS Support Smithy model: the Support Cases API
4//! (`CreateCase` / `DescribeCases` / `DescribeCommunications` /
5//! `AddCommunicationToCase` / `ResolveCase`), attachment sets
6//! (`AddAttachmentsToSet` / `DescribeAttachment`), the Trusted Advisor API
7//! (`DescribeTrustedAdvisorChecks` / `DescribeTrustedAdvisorCheckResult` /
8//! `DescribeTrustedAdvisorCheckSummaries` /
9//! `DescribeTrustedAdvisorCheckRefreshStatuses` / `RefreshTrustedAdvisorCheck`),
10//! severity levels (`DescribeSeverityLevels`), and the case-creation
11//! reference operations (`DescribeServices` / `DescribeCreateCaseOptions` /
12//! `DescribeSupportedLanguages`).
13//!
14//! Requests carry `X-Amz-Target: AWSSupport_20130415.<Operation>`; dispatch
15//! keys off `req.action`. Every operation runs model-driven input validation
16//! first (required / length / range / enum / pattern), then real,
17//! account-partitioned, persisted CRUD.
18//!
19//! Support cases are real: `CreateCase` mints an AWS-shaped case id
20//! (`case-{account}-{year}-{hex}`) and a numeric `displayId`, opens the case
21//! `status: "opened"`, and seeds its communication thread with the initial
22//! `communicationBody`. `DescribeCases` filters by case-id list / display id /
23//! time window / resolved inclusion / language and paginates with a
24//! round-tripping `nextToken`. `AddCommunicationToCase` appends to the thread,
25//! `DescribeCommunications` pages it, and `ResolveCase` flips the case to
26//! `resolved`, returning the initial and final status. Attachment sets are real
27//! (`AddAttachmentsToSet` mints/extends an `attachmentSetId` with an
28//! `expiryTime`; `DescribeAttachment` returns a stored attachment by id).
29//! Severity levels and the Trusted Advisor check catalogue are faithful static
30//! AWS reference data; the Trusted Advisor refresh status is a real per-check
31//! `none -> enqueued -> processing -> success` state machine.
32//!
33//! Honest gap: fakecloud does not run the real Trusted Advisor analysis engine
34//! or attach a live AWS Support agent. `DescribeTrustedAdvisorCheckResult` and
35//! `DescribeTrustedAdvisorCheckSummaries` return well-formed, structurally
36//! correct result shapes reporting zero flagged resources (an all-clear
37//! account) rather than fabricating findings, and no automated support-agent
38//! reply is generated for a case. Cases, communications, attachment sets,
39//! severity levels, the check catalogue, and the refresh state machine are all
40//! real, account-partitioned, and persisted.
41
42mod catalog;
43pub mod persistence;
44pub mod service;
45pub mod shared;
46pub mod state;
47mod validate;
48
49pub use service::{SupportService, SUPPORT_ACTIONS};
50pub use state::{
51    SharedSupportState, SupportData, SupportSnapshot, SUPPORT_SNAPSHOT_SCHEMA_VERSION,
52};