| 1 | import type * as emr from "@distilled.cloud/aws/emr-serverless"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Application } from "./Application.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `emr-serverless:StopApplication`. |
| 8 | * |
| 9 | * Stops the bound {@link Application}, releasing its pre-initialized |
| 10 | * capacity so it stops billing — e.g. a scheduled cost-control function that |
| 11 | * shuts the application down outside business hours. Provide the |
| 12 | * implementation with `Effect.provide(AWS.EMRServerless.StopApplicationHttp)`. |
| 13 | * ### Application Control |
| 14 | * **Example:** Stop Outside Business Hours |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const stopApplication = yield* AWS.EMRServerless.StopApplication(app); |
| 18 | * |
| 19 | * // runtime |
| 20 | * yield* stopApplication(); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface StopApplication extends Binding.Service< |
| 26 | StopApplication, |
| 27 | "AWS.EMRServerless.StopApplication", |
| 28 | ( |
| 29 | application: Application, |
| 30 | ) => Effect.Effect< |
| 31 | () => Effect.Effect<emr.StopApplicationResponse, emr.StopApplicationError> |
| 32 | > |
| 33 | > {} |
| 34 | export const StopApplication = Binding.Service<StopApplication>( |
| 35 | "AWS.EMRServerless.StopApplication", |
| 36 | ); |