GetCostAndUsageComparisons
Source:
src/AWS/CostExplorer/GetCostAndUsageComparisons.ts
Runtime binding for ce:GetCostAndUsageComparisons.
Compare cost and usage between two periods within the last 13
months (up to 38 months with multi-year data enabled). Provide the implementation with
Effect.provide(AWS.CostExplorer.GetCostAndUsageComparisonsHttp).
Querying Cost and Usage
Section titled “Querying Cost and Usage”// init — account-level binding takes no resourceconst getCostAndUsageComparisons = yield* AWS.CostExplorer.GetCostAndUsageComparisons();
// runtimeconst result = yield* getCostAndUsageComparisons({ BaselineTimePeriod: { Start: "2026-05-01", End: "2026-06-01" }, ComparisonTimePeriod: { Start: "2026-06-01", End: "2026-07-01" }, MetricForComparison: "UnblendedCost",});