The best way to control Claude Code, Codex and more from any computer or phone

main
ts 40 lines 1.26 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 export interface GetCanaryRequest extends Omit<synthetics.GetCanaryRequest, "Name"> {}
7
8 /**
9 * Runtime binding for `synthetics:GetCanary` — read the full configuration
10 * and current status (state, last run, timeline) of the bound
11 * {@link Canary}; the canary name is injected automatically.
12 *
13 * Provide `Synthetics.GetCanaryHttp` on the hosting Lambda Function to
14 * satisfy the requirement.
15 * ### Reading Canary Status
16 * **Example:** Read the Canary's Current State
17 * ```typescript
18 * // init — grants synthetics:GetCanary on the canary
19 * const getCanary = yield* AWS.Synthetics.GetCanary(canary);
20 *
21 * // runtime
22 * const { Canary } = yield* getCanary();
23 * const state = Canary?.Status?.State;
24 * ```
25 *
26 * @binding
27 */
28 export interface GetCanary extends Binding.Service<
29 GetCanary,
30 "AWS.Synthetics.GetCanary",
31 (
32 canary: Canary,
33 ) => Effect.Effect<
34 (
35 request?: GetCanaryRequest,
36 ) => Effect.Effect<synthetics.GetCanaryResponse, synthetics.GetCanaryError>
37 >
38 > {}
39
40 export const GetCanary = Binding.Service<GetCanary>("AWS.Synthetics.GetCanary");