import type * as ivs from "@distilled.cloud/aws/ivs"; import type * as Effect from "effect/Effect"; import * as Binding from "../../Binding.ts"; import type { Channel } from "./Channel.ts"; export interface GetStreamSessionRequest extends Omit< ivs.GetStreamSessionRequest, "channelArn" > {} /** * Runtime binding for `ivs:GetStreamSession`. * * Reads the metadata of a specific stream session on the bound * {@link Channel} — ingest configuration, recording details, and the * session's truncated event log. Omit `streamId` to read the most recent * session. The channel ARN is injected from the binding. Provide the * implementation with `Effect.provide(AWS.IVS.GetStreamSessionHttp)`. * ### Monitoring Live Streams * **Example:** Inspect the Latest Broadcast Session * ```typescript * // init — bind the operation to the channel * const getStreamSession = yield* AWS.IVS.GetStreamSession(channel); * * // runtime * const { streamSession } = yield* getStreamSession({}); * yield* Effect.log(`codec: ${streamSession?.ingestConfiguration?.video?.codec}`); * ``` * * @binding */ export interface GetStreamSession extends Binding.Service< GetStreamSession, "AWS.IVS.GetStreamSession", ( channel: Channel, ) => Effect.Effect< ( request?: GetStreamSessionRequest, ) => Effect.Effect > > {} export const GetStreamSession = Binding.Service( "AWS.IVS.GetStreamSession", );