| 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 GetRightsizingRecommendation}. |
| 7 | */ |
| 8 | export interface GetRightsizingRecommendationRequest |
| 9 | extends ce.GetRightsizingRecommendationRequest {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `ce:GetRightsizingRecommendation`. |
| 13 | * |
| 14 | * Get recommendations for idle and underutilized EC2 instances — |
| 15 | * terminate or downsize suggestions with estimated savings. Provide the implementation with |
| 16 | * `Effect.provide(AWS.CostExplorer.GetRightsizingRecommendationHttp)`. |
| 17 | * ### Rightsizing |
| 18 | * **Example:** Get EC2 Rightsizing Recommendations |
| 19 | * ```typescript |
| 20 | * // init — account-level binding takes no resource |
| 21 | * const getRightsizingRecommendation = yield* AWS.CostExplorer.GetRightsizingRecommendation(); |
| 22 | * |
| 23 | * // runtime |
| 24 | * const result = yield* getRightsizingRecommendation({ |
| 25 | * Service: "AmazonEC2", |
| 26 | * }); |
| 27 | * const recommendations = result.RightsizingRecommendations; |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface GetRightsizingRecommendation extends Binding.Service< |
| 33 | GetRightsizingRecommendation, |
| 34 | "AWS.CostExplorer.GetRightsizingRecommendation", |
| 35 | () => Effect.Effect< |
| 36 | ( |
| 37 | request: GetRightsizingRecommendationRequest, |
| 38 | ) => Effect.Effect< |
| 39 | ce.GetRightsizingRecommendationResponse, |
| 40 | ce.GetRightsizingRecommendationError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | |
| 45 | export const GetRightsizingRecommendation = |
| 46 | Binding.Service<GetRightsizingRecommendation>( |
| 47 | "AWS.CostExplorer.GetRightsizingRecommendation", |
| 48 | ); |