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:DescribeFlowSourceMetadata`.
8 *
9 * Reads the bound {@link Flow}'s ingest transport-stream metadata — the
10 * programs and their video/audio/data streams — plus status messages about
11 * the source. Useful for confidence monitoring of what is actually
12 * arriving at the flow. A flow whose source is not currently receiving
13 * content answers with `Messages` instead of media info. The flow ARN is
14 * injected from the binding. Provide the implementation with
15 * `Effect.provide(AWS.MediaConnect.DescribeFlowSourceMetadataHttp)`.
16 * ### Observing Flows
17 * **Example:** Inspect the Incoming Transport Stream
18 * ```typescript
19 * // init — bind the operation to the flow
20 * const sourceMetadata = yield* AWS.MediaConnect.DescribeFlowSourceMetadata(flow);
21 *
22 * // runtime
23 * const { TransportMediaInfo, Messages } = yield* sourceMetadata();
24 * const programs = TransportMediaInfo?.Programs ?? [];
25 * ```
26 *
27 * @binding
28 */
29export interface DescribeFlowSourceMetadata extends Binding.Service<
30 DescribeFlowSourceMetadata,
31 "AWS.MediaConnect.DescribeFlowSourceMetadata",
32 (
33 flow: Flow,
34 ) => Effect.Effect<
35 () => Effect.Effect<
36 mediaconnect.DescribeFlowSourceMetadataResponse,
37 mediaconnect.DescribeFlowSourceMetadataError
38 >
39 >
40> {}
41export const DescribeFlowSourceMetadata =
42 Binding.Service<DescribeFlowSourceMetadata>(
43 "AWS.MediaConnect.DescribeFlowSourceMetadata",
44 );