The best way to control Claude Code, Codex and more from any computer or phone

main
ts 36 lines 1.29 KB
Raw
1 import type * as medialive from "@distilled.cloud/aws/medialive";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Channel } from "./Channel.ts";
5
6 /**
7 * Runtime binding for `medialive:StartChannel`.
8 *
9 * Starts the bound {@link Channel}, transitioning it from `IDLE` through
10 * `STARTING` to `RUNNING`. A RUNNING channel encodes and bills hourly —
11 * pair with {@link StopChannel} to control encoding cost (e.g. a
12 * scheduler Lambda that runs the channel only during broadcast windows).
13 * The channel id is injected from the binding. Provide the implementation
14 * with `Effect.provide(AWS.MediaLive.StartChannelHttp)`.
15 * ### Controlling Channels
16 * **Example:** Start the Channel for a Broadcast Window
17 * ```typescript
18 * // init — bind the operation to the channel
19 * const startChannel = yield* AWS.MediaLive.StartChannel(channel);
20 *
21 * // runtime
22 * const { State } = yield* startChannel();
23 * ```
24 *
25 * @binding
26 */
27 export interface StartChannel extends Binding.Service<
28 StartChannel,
29 "AWS.MediaLive.StartChannel",
30 (
31 channel: Channel,
32 ) => Effect.Effect<
33 () => Effect.Effect<medialive.StartChannelResponse, medialive.StartChannelError>
34 >
35 > {}
36 export const StartChannel = Binding.Service<StartChannel>("AWS.MediaLive.StartChannel");