1import type * as mediaconnect from "@distilled.cloud/aws/mediaconnect";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Flow } from "./Flow.ts";
5
6/**
7 * Runtime binding for `mediaconnect:StartFlow`.
8 *
9 * Starts the bound {@link Flow}, transitioning it from `STANDBY` through
10 * `STARTING` to `ACTIVE`. An ACTIVE flow ingests and egresses media and
11 * bills hourly — pair with {@link StopFlow} to control transport cost
12 * (e.g. a scheduler Lambda that runs the flow only during broadcast
13 * windows). The flow ARN is injected from the binding. Provide the
14 * implementation with `Effect.provide(AWS.MediaConnect.StartFlowHttp)`.
15 * ### Controlling Flows
16 * **Example:** Start the Flow for a Broadcast Window
17 * ```typescript
18 * // init — bind the operation to the flow
19 * const startFlow = yield* AWS.MediaConnect.StartFlow(flow);
20 *
21 * // runtime
22 * const { Status } = yield* startFlow();
23 * ```
24 *
25 * @binding
26 */
27export interface StartFlow extends Binding.Service<
28 StartFlow,
29 "AWS.MediaConnect.StartFlow",
30 (
31 flow: Flow,
32 ) => Effect.Effect<
33 () => Effect.Effect<
34 mediaconnect.StartFlowResponse,
35 mediaconnect.StartFlowError
36 >
37 >
38> {}
39export const StartFlow = Binding.Service<StartFlow>(
40 "AWS.MediaConnect.StartFlow",
41);