The best way to control Claude Code, Codex and more from any computer or phone

main
ts 44 lines 1.56 KB
Raw
1 import type * as ce from "@distilled.cloud/aws/cost-explorer";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Request for {@link GetCostAndUsageComparisons}.
7 */
8 export interface GetCostAndUsageComparisonsRequest extends ce.GetCostAndUsageComparisonsRequest {}
9
10 /**
11 * Runtime binding for `ce:GetCostAndUsageComparisons`.
12 *
13 * Compare cost and usage between two periods within the last 13
14 * months (up to 38 months with multi-year data enabled). Provide the implementation with
15 * `Effect.provide(AWS.CostExplorer.GetCostAndUsageComparisonsHttp)`.
16 * ### Querying Cost and Usage
17 * **Example:** Compare Two Billing Periods
18 * ```typescript
19 * // init — account-level binding takes no resource
20 * const getCostAndUsageComparisons = yield* AWS.CostExplorer.GetCostAndUsageComparisons();
21 *
22 * // runtime
23 * const result = yield* getCostAndUsageComparisons({
24 * BaselineTimePeriod: { Start: "2026-05-01", End: "2026-06-01" },
25 * ComparisonTimePeriod: { Start: "2026-06-01", End: "2026-07-01" },
26 * MetricForComparison: "UnblendedCost",
27 * });
28 * ```
29 *
30 * @binding
31 */
32 export interface GetCostAndUsageComparisons extends Binding.Service<
33 GetCostAndUsageComparisons,
34 "AWS.CostExplorer.GetCostAndUsageComparisons",
35 () => Effect.Effect<
36 (
37 request: GetCostAndUsageComparisonsRequest,
38 ) => Effect.Effect<ce.GetCostAndUsageComparisonsResponse, ce.GetCostAndUsageComparisonsError>
39 >
40 > {}
41
42 export const GetCostAndUsageComparisons = Binding.Service<GetCostAndUsageComparisons>(
43 "AWS.CostExplorer.GetCostAndUsageComparisons",
44 );