| 1 | import type * as medialive from "@distilled.cloud/aws/medialive"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `medialive:ListInputs`. |
| 7 | * |
| 8 | * Enumerates the account's MediaLive inputs (one page per call — pass |
| 9 | * `NextToken` from the previous response to continue) — e.g. an |
| 10 | * inventory endpoint that maps ingest endpoints to the channels they |
| 11 | * feed. Account-level: the deploy-time grant is `medialive:ListInputs` |
| 12 | * on `*`. Provide the implementation with |
| 13 | * `Effect.provide(AWS.MediaLive.ListInputsHttp)`. |
| 14 | * ### Observing Inputs |
| 15 | * **Example:** Enumerate the Account's Inputs |
| 16 | * ```typescript |
| 17 | * // init — bind the account-level operation |
| 18 | * const listInputs = yield* AWS.MediaLive.ListInputs(); |
| 19 | * |
| 20 | * // runtime |
| 21 | * const { Inputs } = yield* listInputs({ MaxResults: 20 }); |
| 22 | * const attached = (Inputs ?? []).filter((i) => i.State === "ATTACHED"); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface ListInputs extends Binding.Service< |
| 28 | ListInputs, |
| 29 | "AWS.MediaLive.ListInputs", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request?: medialive.ListInputsRequest, |
| 33 | ) => Effect.Effect<medialive.ListInputsResponse, medialive.ListInputsError> |
| 34 | > |
| 35 | > {} |
| 36 | export const ListInputs = Binding.Service<ListInputs>( |
| 37 | "AWS.MediaLive.ListInputs", |
| 38 | ); |