1import type * as ce from "@distilled.cloud/aws/cost-explorer";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Request for {@link GetCostComparisonDrivers}.
7 */
8export interface GetCostComparisonDriversRequest
9 extends ce.GetCostComparisonDriversRequest {}
10
11/**
12 * Runtime binding for `ce:GetCostComparisonDrivers`.
13 *
14 * Retrieve the top cost drivers explaining the change between two
15 * billing periods — which services, accounts, or usage types moved the
16 * bill. Provide the implementation with
17 * `Effect.provide(AWS.CostExplorer.GetCostComparisonDriversHttp)`.
18 * ### Querying Cost and Usage
19 * **Example:** Find What Drove a Cost Change
20 * ```typescript
21 * // init — account-level binding takes no resource
22 * const getCostComparisonDrivers = yield* AWS.CostExplorer.GetCostComparisonDrivers();
23 *
24 * // runtime
25 * const result = yield* getCostComparisonDrivers({
26 * BaselineTimePeriod: { Start: "2026-05-01", End: "2026-06-01" },
27 * ComparisonTimePeriod: { Start: "2026-06-01", End: "2026-07-01" },
28 * MetricForComparison: "UnblendedCost",
29 * });
30 * ```
31 *
32 * @binding
33 */
34export interface GetCostComparisonDrivers extends Binding.Service<
35 GetCostComparisonDrivers,
36 "AWS.CostExplorer.GetCostComparisonDrivers",
37 () => Effect.Effect<
38 (
39 request: GetCostComparisonDriversRequest,
40 ) => Effect.Effect<
41 ce.GetCostComparisonDriversResponse,
42 ce.GetCostComparisonDriversError
43 >
44 >
45> {}
46
47export const GetCostComparisonDrivers =
48 Binding.Service<GetCostComparisonDrivers>(
49 "AWS.CostExplorer.GetCostComparisonDrivers",
50 );