1import type * as emrc from "@distilled.cloud/aws/emr-containers";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { VirtualCluster } from "./VirtualCluster.ts";
5
6/**
7 * Runtime binding for `emr-containers:CancelJobRun`.
8 *
9 * Cancels a job run on the bound {@link VirtualCluster}. The virtual cluster
10 * ID is injected from the binding; pass the job run `id` returned by
11 * `StartJobRun`. Provide the implementation with
12 * `Effect.provide(AWS.EMRContainers.CancelJobRunHttp)`.
13 * ### Running Jobs
14 * **Example:** Cancel A Runaway Job
15 * ```typescript
16 * // init
17 * const cancelJobRun = yield* AWS.EMRContainers.CancelJobRun(virtualCluster);
18 *
19 * // runtime
20 * yield* cancelJobRun({ id: jobRunId });
21 * ```
22 *
23 * @binding
24 */
25export interface CancelJobRun extends Binding.Service<
26 CancelJobRun,
27 "AWS.EMRContainers.CancelJobRun",
28 (
29 virtualCluster: VirtualCluster,
30 ) => Effect.Effect<
31 (
32 request: Omit<emrc.CancelJobRunRequest, "virtualClusterId">,
33 ) => Effect.Effect<emrc.CancelJobRunResponse, emrc.CancelJobRunError>
34 >
35> {}
36export const CancelJobRun = Binding.Service<CancelJobRun>(
37 "AWS.EMRContainers.CancelJobRun",
38);