| 1 | import type * as mediaconnect from "@distilled.cloud/aws/mediaconnect"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Flow } from "./Flow.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `mediaconnect:DescribeFlow`. |
| 8 | * |
| 9 | * Reads the bound {@link Flow}'s live state — status (`STANDBY`/`ACTIVE`), |
| 10 | * source, outputs, and entitlements — e.g. for an operations dashboard or |
| 11 | * a scheduler that only starts a flow that is not already running. The |
| 12 | * flow ARN is injected from the binding. Provide the implementation with |
| 13 | * `Effect.provide(AWS.MediaConnect.DescribeFlowHttp)`. |
| 14 | * ### Observing Flows |
| 15 | * **Example:** Read the Flow's Current Status |
| 16 | * ```typescript |
| 17 | * // init — bind the operation to the flow |
| 18 | * const describeFlow = yield* AWS.MediaConnect.DescribeFlow(flow); |
| 19 | * |
| 20 | * // runtime |
| 21 | * const { Flow: current } = yield* describeFlow(); |
| 22 | * const running = current?.Status === "ACTIVE"; |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeFlow extends Binding.Service< |
| 28 | DescribeFlow, |
| 29 | "AWS.MediaConnect.DescribeFlow", |
| 30 | ( |
| 31 | flow: Flow, |
| 32 | ) => Effect.Effect< |
| 33 | () => Effect.Effect< |
| 34 | mediaconnect.DescribeFlowResponse, |
| 35 | mediaconnect.DescribeFlowError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const DescribeFlow = Binding.Service<DescribeFlow>( |
| 40 | "AWS.MediaConnect.DescribeFlow", |
| 41 | ); |