@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 35 lines 1.18 KB
Raw
1 import type * as synthetics from "@distilled.cloud/aws/synthetics";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Canary } from "./Canary.ts";
5
6 /**
7 * Runtime binding for `synthetics:StopCanary` — stop future runs of the
8 * bound {@link Canary} (an in-flight run completes on its own); the canary
9 * name is injected automatically.
10 *
11 * Provide `Synthetics.StopCanaryHttp` on the hosting Lambda Function to
12 * satisfy the requirement.
13 * ### Controlling the Canary
14 * **Example:** Stop the Canary
15 * ```typescript
16 * // init — grants synthetics:StopCanary on the canary
17 * const stopCanary = yield* AWS.Synthetics.StopCanary(canary);
18 *
19 * // runtime — a ConflictException means it is not currently running
20 * yield* stopCanary().pipe(
21 * Effect.catchTag("ConflictException", () => Effect.void),
22 * );
23 * ```
24 *
25 * @binding
26 */
27 export interface StopCanary extends Binding.Service<
28 StopCanary,
29 "AWS.Synthetics.StopCanary",
30 (
31 canary: Canary,
32 ) => Effect.Effect<() => Effect.Effect<synthetics.StopCanaryResponse, synthetics.StopCanaryError>>
33 > {}
34
35 export const StopCanary = Binding.Service<StopCanary>("AWS.Synthetics.StopCanary");