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:GetJob` — poll the status and full JSON
7 * of a submitted transcode job from runtime code.
8 *
9 * Job ids are server-assigned at runtime, so the binding takes no arguments
10 * and grants `mediaconvert:GetJob` on `*`. Provide the implementation with
11 * `Effect.provide(AWS.MediaConvert.GetJobHttp)`.
12 *
13 * ### Tracking Jobs
14 * **Example:** Poll a Job's Status
15 * ```typescript
16 * // init
17 * const getJob = yield* AWS.MediaConvert.GetJob();
18 *
19 * // runtime
20 * const { Job } = yield* getJob({ Id: jobId });
21 * if (Job?.Status === "COMPLETE") { ... }
22 * ```
23 *
24 * @binding
25 */
26export interface GetJob extends Binding.Service<
27 GetJob,
28 "AWS.MediaConvert.GetJob",
29 () => Effect.Effect<
30 (
31 request: mediaconvert.GetJobRequest,
32 ) => Effect.Effect<mediaconvert.GetJobResponse, mediaconvert.GetJobError>
33 >
34> {}
35export const GetJob = Binding.Service<GetJob>("AWS.MediaConvert.GetJob");