1import type * as glue from "@distilled.cloud/aws/glue";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Job } from "./Job.ts";
5
6export interface BatchStopJobRunRequest extends Omit<
7 glue.BatchStopJobRunRequest,
8 "JobName"
9> {}
10
11/**
12 * Runtime binding for `glue:BatchStopJobRun`.
13 *
14 * Stops one or more in-flight runs of the bound {@link Job}. Per-run
15 * failures come back in the response's `Errors` list (the call itself
16 * succeeds), so inspect `SuccessfulSubmissions`/`Errors` rather than the
17 * error channel. The job name is injected from the binding. Provide the
18 * implementation with `Effect.provide(AWS.Glue.BatchStopJobRunHttp)`.
19 * ### Running Jobs
20 * **Example:** Stop a Run
21 * ```typescript
22 * // init
23 * const batchStopJobRun = yield* AWS.Glue.BatchStopJobRun(job);
24 *
25 * // runtime
26 * const { SuccessfulSubmissions, Errors } = yield* batchStopJobRun({
27 * JobRunIds: [runId],
28 * });
29 * ```
30 *
31 * @binding
32 */
33export interface BatchStopJobRun extends Binding.Service<
34 BatchStopJobRun,
35 "AWS.Glue.BatchStopJobRun",
36 (
37 job: Job,
38 ) => Effect.Effect<
39 (
40 request: BatchStopJobRunRequest,
41 ) => Effect.Effect<glue.BatchStopJobRunResponse, glue.BatchStopJobRunError>
42 >
43> {}
44
45export const BatchStopJobRun = Binding.Service<BatchStopJobRun>(
46 "AWS.Glue.BatchStopJobRun",
47);