| 1 | import type * as ce from "@distilled.cloud/aws/cost-explorer"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Request for {@link GetUsageForecast}. |
| 7 | */ |
| 8 | export interface GetUsageForecastRequest extends ce.GetUsageForecastRequest {} |
| 9 | |
| 10 | /** |
| 11 | * Runtime binding for `ce:GetUsageForecast`. |
| 12 | * |
| 13 | * Forecast usage quantity (e.g. hours, requests) over a future time |
| 14 | * period for a filtered slice of your usage. Provide the implementation with |
| 15 | * `Effect.provide(AWS.CostExplorer.GetUsageForecastHttp)`. |
| 16 | * ### Forecasting |
| 17 | * **Example:** Forecast Usage Quantity |
| 18 | * ```typescript |
| 19 | * // init — account-level binding takes no resource |
| 20 | * const getUsageForecast = yield* AWS.CostExplorer.GetUsageForecast(); |
| 21 | * |
| 22 | * // runtime |
| 23 | * const result = yield* getUsageForecast({ |
| 24 | * TimePeriod: { Start: "2026-08-01", End: "2026-09-01" }, |
| 25 | * Metric: "USAGE_QUANTITY", |
| 26 | * Granularity: "MONTHLY", |
| 27 | * Filter: { Dimensions: { Key: "USAGE_TYPE_GROUP", Values: ["EC2: Running Hours"] } }, |
| 28 | * }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface GetUsageForecast extends Binding.Service< |
| 34 | GetUsageForecast, |
| 35 | "AWS.CostExplorer.GetUsageForecast", |
| 36 | () => Effect.Effect< |
| 37 | ( |
| 38 | request: GetUsageForecastRequest, |
| 39 | ) => Effect.Effect<ce.GetUsageForecastResponse, ce.GetUsageForecastError> |
| 40 | > |
| 41 | > {} |
| 42 | |
| 43 | export const GetUsageForecast = Binding.Service<GetUsageForecast>( |
| 44 | "AWS.CostExplorer.GetUsageForecast", |
| 45 | ); |