1import type * as emr from "@distilled.cloud/aws/emr-serverless";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Application } from "./Application.ts";
5
6/**
7 * Request accepted by the {@link CancelJobRun} runtime callable. The
8 * `applicationId` is injected from the bound {@link Application}.
9 */
10export type CancelJobRunInput = Omit<emr.CancelJobRunRequest, "applicationId">;
11
12/**
13 * Runtime binding for `emr-serverless:CancelJobRun`.
14 *
15 * Cancels a running or queued job run on the bound {@link Application} — the
16 * kill switch for a runaway or superseded job. Provide the implementation
17 * with `Effect.provide(AWS.EMRServerless.CancelJobRunHttp)`.
18 * ### Running Jobs
19 * **Example:** Cancel A Job Run
20 * ```typescript
21 * // init
22 * const cancelJobRun = yield* AWS.EMRServerless.CancelJobRun(app);
23 *
24 * // runtime
25 * yield* cancelJobRun({ jobRunId });
26 * ```
27 *
28 * @binding
29 */
30export interface CancelJobRun extends Binding.Service<
31 CancelJobRun,
32 "AWS.EMRServerless.CancelJobRun",
33 (
34 application: Application,
35 ) => Effect.Effect<
36 (
37 request: CancelJobRunInput,
38 ) => Effect.Effect<emr.CancelJobRunResponse, emr.CancelJobRunError>
39 >
40> {}
41export const CancelJobRun = Binding.Service<CancelJobRun>(
42 "AWS.EMRServerless.CancelJobRun",
43);