Skip to content

ListChannels

Source: src/AWS/MediaLive/ListChannels.ts

Runtime binding for medialive:ListChannels.

Enumerates the account’s MediaLive channels (one page per call — pass NextToken from the previous response to continue) — e.g. a cost sentinel that finds channels left RUNNING outside broadcast hours. Account-level: the deploy-time grant is medialive:ListChannels on *. Provide the implementation with Effect.provide(AWS.MediaLive.ListChannelsHttp).

// init — bind the account-level operation
const listChannels = yield* AWS.MediaLive.ListChannels();
// runtime
const { Channels } = yield* listChannels({ MaxResults: 20 });
const running = (Channels ?? []).filter((c) => c.State === "RUNNING");