@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 37 lines 1.32 KB
Raw
1 import type * as mediaconnect from "@distilled.cloud/aws/mediaconnect";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Flow } from "./Flow.ts";
5
6 /**
7 * Runtime binding for `mediaconnect:StopFlow`.
8 *
9 * Stops the bound {@link Flow}, transitioning it from `ACTIVE` through
10 * `STOPPING` back to `STANDBY` (where it no longer bills for transport).
11 * Stopping a flow that is not running fails with the typed
12 * `BadRequestException` tag. The flow ARN is injected from the binding.
13 * Provide the implementation with
14 * `Effect.provide(AWS.MediaConnect.StopFlowHttp)`.
15 * ### Controlling Flows
16 * **Example:** Stop the Flow After the Broadcast
17 * ```typescript
18 * // init — bind the operation to the flow
19 * const stopFlow = yield* AWS.MediaConnect.StopFlow(flow);
20 *
21 * // runtime — a flow that is already in STANDBY answers with the typed
22 * // BadRequestException tag
23 * yield* stopFlow().pipe(
24 * Effect.catchTag("BadRequestException", () => Effect.void),
25 * );
26 * ```
27 *
28 * @binding
29 */
30 export interface StopFlow extends Binding.Service<
31 StopFlow,
32 "AWS.MediaConnect.StopFlow",
33 (
34 flow: Flow,
35 ) => Effect.Effect<() => Effect.Effect<mediaconnect.StopFlowResponse, mediaconnect.StopFlowError>>
36 > {}
37 export const StopFlow = Binding.Service<StopFlow>("AWS.MediaConnect.StopFlow");