@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 44 lines 1.46 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 GetReservationCoverage}.
7 */
8 export interface GetReservationCoverageRequest extends ce.GetReservationCoverageRequest {}
9
10 /**
11 * Runtime binding for `ce:GetReservationCoverage`.
12 *
13 * Retrieve how much of your eligible usage (EC2, RDS, ElastiCache,
14 * Redshift, OpenSearch, …) was covered by reservations over a time
15 * period. Provide the implementation with
16 * `Effect.provide(AWS.CostExplorer.GetReservationCoverageHttp)`.
17 * ### Reservations
18 * **Example:** Check Reservation Coverage
19 * ```typescript
20 * // init — account-level binding takes no resource
21 * const getReservationCoverage = yield* AWS.CostExplorer.GetReservationCoverage();
22 *
23 * // runtime
24 * const result = yield* getReservationCoverage({
25 * TimePeriod: { Start: "2026-06-01", End: "2026-07-01" },
26 * });
27 * const coverage = result.Total?.CoverageHours?.CoverageHoursPercentage;
28 * ```
29 *
30 * @binding
31 */
32 export interface GetReservationCoverage extends Binding.Service<
33 GetReservationCoverage,
34 "AWS.CostExplorer.GetReservationCoverage",
35 () => Effect.Effect<
36 (
37 request: GetReservationCoverageRequest,
38 ) => Effect.Effect<ce.GetReservationCoverageResponse, ce.GetReservationCoverageError>
39 >
40 > {}
41
42 export const GetReservationCoverage = Binding.Service<GetReservationCoverage>(
43 "AWS.CostExplorer.GetReservationCoverage",
44 );