| 1 | import type * as mediatailor from "@distilled.cloud/aws/mediatailor"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `mediatailor:CreateProgram` — schedule a VOD or live |
| 7 | * source as a program on a channel-assembly channel. Dynamic program |
| 8 | * scheduling is the core runtime workflow of channel assembly: applications |
| 9 | * insert programs into a linear channel's schedule as content becomes |
| 10 | * available. |
| 11 | * |
| 12 | * Channel/program names are runtime parameters, so the binding is |
| 13 | * account-level and grants `mediatailor:CreateProgram` on `*`. Provide the |
| 14 | * implementation with `Effect.provide(AWS.MediaTailor.CreateProgramHttp)`. |
| 15 | * |
| 16 | * ### Channel Assembly |
| 17 | * **Example:** Append a VOD source to a channel |
| 18 | * ```typescript |
| 19 | * const createProgram = yield* AWS.MediaTailor.CreateProgram(); |
| 20 | * |
| 21 | * yield* createProgram({ |
| 22 | * ChannelName: "my-channel", |
| 23 | * ProgramName: `episode-${id}`, |
| 24 | * SourceLocationName: "my-origin", |
| 25 | * VodSourceName: "episode-1", |
| 26 | * ScheduleConfiguration: { Transition: { Type: "RELATIVE", RelativePosition: "AFTER_PROGRAM" } }, |
| 27 | * }); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface CreateProgram extends Binding.Service< |
| 33 | CreateProgram, |
| 34 | "AWS.MediaTailor.CreateProgram", |
| 35 | () => Effect.Effect< |
| 36 | ( |
| 37 | request: mediatailor.CreateProgramRequest, |
| 38 | ) => Effect.Effect< |
| 39 | mediatailor.CreateProgramResponse, |
| 40 | mediatailor.CreateProgramError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | export const CreateProgram = Binding.Service<CreateProgram>( |
| 45 | "AWS.MediaTailor.CreateProgram", |
| 46 | ); |