Skip to main content

fakecloud_ce/
lib.rs

1//! AWS Cost Explorer (`ce`) awsJson1.1 control plane for fakecloud.
2//!
3//! The full 47-operation Cost Explorer Smithy model
4//! (`com.amazonaws.costexplorer#AWSInsightsIndexService`): anomaly monitors and
5//! subscriptions, cost category definitions and their resource associations,
6//! cost allocation tags (status + backfill history), resource tagging,
7//! commitment-purchase and savings-plans recommendation analyses, and the full
8//! cost/usage/reservation/savings-plans analytics surface.
9//!
10//! Cost Explorer reports BILLING data. A fake account incurs no real AWS cost,
11//! so the honest, faithful state is a fresh account with zero recorded usage —
12//! the same framing fakecloud uses for CloudTrail ("no event-recording
13//! engine"). Concretely this splits into two halves:
14//!
15//! * Fully real, account-partitioned, persisted CRUD for every stored
16//!   resource: anomaly monitors/subscriptions, cost categories (+ versioning
17//!   on update), cost-allocation-tag status + backfill requests, tags, anomaly
18//!   feedback, and analysis/generation requests that settle to a terminal
19//!   status so `List`/`Get` reflect them. Every `Create` is echoed by its
20//!   `Get`/`Describe`, every `Update` persists, every `Delete` deletes.
21//! * Structurally-valid zero/empty analytics for the reporting operations:
22//!   the model's exact output shape, correctly typed, with empty result series
23//!   and zeroed-but-present required aggregate objects (`ResultsByTime`,
24//!   forecasts, coverage, utilization, recommendations). This is the "no usage
25//!   recorded" honest state, not a stub.
26//!
27//! Model-derived input validation (`@required`, `@length`, `@range`, enum
28//! value sets) rejects malformed requests with a 4xx so negative variants get
29//! the right error.
30
31pub mod persistence;
32pub mod service;
33pub mod state;
34mod validate;
35
36pub use service::CeService;
37pub use state::{CeData, SharedCeState, CE_SNAPSHOT_SCHEMA_VERSION};