1import type * as mediapackagev2 from "@distilled.cloud/aws/mediapackagev2";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { OriginEndpoint } from "./OriginEndpoint.ts";
5
6/**
7 * Runtime binding for `mediapackagev2:GetHarvestJob`.
8 *
9 * Reads the status of a harvest job on the bound {@link OriginEndpoint} —
10 * e.g. polling until a clip export reaches `COMPLETED` before publishing
11 * the VOD asset. The endpoint's group, channel, and name are injected from
12 * the binding. Provide the implementation with
13 * `Effect.provide(AWS.MediaPackageV2.GetHarvestJobHttp)`.
14 * ### Harvesting Live-to-VOD Clips
15 * **Example:** Poll a Harvest Job Until It Completes
16 * ```typescript
17 * // init — bind the operation to the endpoint
18 * const getHarvestJob = yield* AWS.MediaPackageV2.GetHarvestJob(endpoint);
19 *
20 * // runtime
21 * const { Status } = yield* getHarvestJob({ HarvestJobName: job.HarvestJobName });
22 * ```
23 *
24 * @binding
25 */
26export interface GetHarvestJob extends Binding.Service<
27 GetHarvestJob,
28 "AWS.MediaPackageV2.GetHarvestJob",
29 (
30 endpoint: OriginEndpoint,
31 ) => Effect.Effect<
32 (
33 request: Omit<
34 mediapackagev2.GetHarvestJobRequest,
35 "ChannelGroupName" | "ChannelName" | "OriginEndpointName"
36 >,
37 ) => Effect.Effect<
38 mediapackagev2.GetHarvestJobResponse,
39 mediapackagev2.GetHarvestJobError
40 >
41 >
42> {}
43export const GetHarvestJob = Binding.Service<GetHarvestJob>(
44 "AWS.MediaPackageV2.GetHarvestJob",
45);