@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 36 lines 1.3 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
5 /**
6 * Runtime binding for `medialive:ListChannels`.
7 *
8 * Enumerates the account's MediaLive channels (one page per call — pass
9 * `NextToken` from the previous response to continue) — e.g. a cost
10 * sentinel that finds channels left RUNNING outside broadcast hours.
11 * Account-level: the deploy-time grant is `medialive:ListChannels` on
12 * `*`. Provide the implementation with
13 * `Effect.provide(AWS.MediaLive.ListChannelsHttp)`.
14 * ### Observing Channels
15 * **Example:** Find Channels Left Running
16 * ```typescript
17 * // init — bind the account-level operation
18 * const listChannels = yield* AWS.MediaLive.ListChannels();
19 *
20 * // runtime
21 * const { Channels } = yield* listChannels({ MaxResults: 20 });
22 * const running = (Channels ?? []).filter((c) => c.State === "RUNNING");
23 * ```
24 *
25 * @binding
26 */
27 export interface ListChannels extends Binding.Service<
28 ListChannels,
29 "AWS.MediaLive.ListChannels",
30 () => Effect.Effect<
31 (
32 request?: medialive.ListChannelsRequest,
33 ) => Effect.Effect<medialive.ListChannelsResponse, medialive.ListChannelsError>
34 >
35 > {}
36 export const ListChannels = Binding.Service<ListChannels>("AWS.MediaLive.ListChannels");