The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as ivs from "@distilled.cloud/aws/ivs"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Channel } from "./Channel.ts"; |
| 5 | |
| 6 | export interface GetStreamSessionRequest extends Omit<ivs.GetStreamSessionRequest, "channelArn"> {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `ivs:GetStreamSession`. |
| 10 | * |
| 11 | * Reads the metadata of a specific stream session on the bound |
| 12 | * {@link Channel} — ingest configuration, recording details, and the |
| 13 | * session's truncated event log. Omit `streamId` to read the most recent |
| 14 | * session. The channel ARN is injected from the binding. Provide the |
| 15 | * implementation with `Effect.provide(AWS.IVS.GetStreamSessionHttp)`. |
| 16 | * ### Monitoring Live Streams |
| 17 | * **Example:** Inspect the Latest Broadcast Session |
| 18 | * ```typescript |
| 19 | * // init — bind the operation to the channel |
| 20 | * const getStreamSession = yield* AWS.IVS.GetStreamSession(channel); |
| 21 | * |
| 22 | * // runtime |
| 23 | * const { streamSession } = yield* getStreamSession({}); |
| 24 | * yield* Effect.log(`codec: ${streamSession?.ingestConfiguration?.video?.codec}`); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface GetStreamSession extends Binding.Service< |
| 30 | GetStreamSession, |
| 31 | "AWS.IVS.GetStreamSession", |
| 32 | ( |
| 33 | channel: Channel, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request?: GetStreamSessionRequest, |
| 37 | ) => Effect.Effect<ivs.GetStreamSessionResponse, ivs.GetStreamSessionError> |
| 38 | > |
| 39 | > {} |
| 40 | export const GetStreamSession = Binding.Service<GetStreamSession>("AWS.IVS.GetStreamSession"); |