| 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:StartApplication`. |
| 8 | * |
| 9 | * Starts the bound {@link Application} — pre-warming its pre-initialized |
| 10 | * capacity ahead of a burst of job submissions so the first job skips the |
| 11 | * application cold start. Provide the implementation with |
| 12 | * `Effect.provide(AWS.EMRServerless.StartApplicationHttp)`. |
| 13 | * ### Application Control |
| 14 | * **Example:** Warm Up Before A Batch Window |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const startApplication = yield* AWS.EMRServerless.StartApplication(app); |
| 18 | * |
| 19 | * // runtime |
| 20 | * yield* startApplication(); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface StartApplication extends Binding.Service< |
| 26 | StartApplication, |
| 27 | "AWS.EMRServerless.StartApplication", |
| 28 | ( |
| 29 | application: Application, |
| 30 | ) => Effect.Effect< |
| 31 | () => Effect.Effect<emr.StartApplicationResponse, emr.StartApplicationError> |
| 32 | > |
| 33 | > {} |
| 34 | export const StartApplication = Binding.Service<StartApplication>( |
| 35 | "AWS.EMRServerless.StartApplication", |
| 36 | ); |