sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ MediaTailor/ UpdateProgram.ts

import type * as mediatailor from "@distilled.cloud/aws/mediatailor";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for `mediatailor:UpdateProgram` — move or re-configure a
 * scheduled program on a channel-assembly channel (e.g. change its
 * transition or ad breaks) before it plays.
 *
 * Channel/program names are runtime parameters, so the binding is
 * account-level and grants `mediatailor:UpdateProgram` on `*`. Provide the
 * implementation with `Effect.provide(AWS.MediaTailor.UpdateProgramHttp)`.
 *
 * ### Channel Assembly
 * **Example:** Reschedule a program
 * ```typescript
 * const updateProgram = yield* AWS.MediaTailor.UpdateProgram();
 *
 * yield* updateProgram({
 *   ChannelName: "my-channel",
 *   ProgramName: `episode-${id}`,
 *   ScheduleConfiguration: { Transition: { ScheduledStartTimeMillis: startAt } },
 * });
 * ```
 *
 * @binding
 */
export interface UpdateProgram extends Binding.Service<
  UpdateProgram,
  "AWS.MediaTailor.UpdateProgram",
  () => Effect.Effect<
    (
      request: mediatailor.UpdateProgramRequest,
    ) => Effect.Effect<mediatailor.UpdateProgramResponse, mediatailor.UpdateProgramError>
  >
> {}
export const UpdateProgram = Binding.Service<UpdateProgram>("AWS.MediaTailor.UpdateProgram");