1import type * as mediaconvert from "@distilled.cloud/aws/mediaconvert";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `mediaconvert:CancelJob` — permanently cancel a
7 * submitted transcode job that has not finished (canceled jobs cannot be
8 * restarted).
9 *
10 * Job ids are server-assigned at runtime, so the binding takes no arguments
11 * and grants `mediaconvert:CancelJob` on `*`. Provide the implementation
12 * with `Effect.provide(AWS.MediaConvert.CancelJobHttp)`.
13 *
14 * ### Tracking Jobs
15 * **Example:** Cancel an In-Flight Job
16 * ```typescript
17 * // init
18 * const cancelJob = yield* AWS.MediaConvert.CancelJob();
19 *
20 * // runtime
21 * yield* cancelJob({ Id: jobId }).pipe(
22 * // already finished / already gone — nothing to cancel
23 * Effect.catchTag(["NotFoundException", "ConflictException"], () => Effect.void),
24 * );
25 * ```
26 *
27 * @binding
28 */
29export interface CancelJob extends Binding.Service<
30 CancelJob,
31 "AWS.MediaConvert.CancelJob",
32 () => Effect.Effect<
33 (
34 request: mediaconvert.CancelJobRequest,
35 ) => Effect.Effect<
36 mediaconvert.CancelJobResponse,
37 mediaconvert.CancelJobError
38 >
39 >
40> {}
41export const CancelJob = Binding.Service<CancelJob>(
42 "AWS.MediaConvert.CancelJob",
43);