@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 38 lines 1.4 KB
Raw
1 import type * as fis from "@distilled.cloud/aws/fis";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { ExperimentTemplate } from "./ExperimentTemplate.ts";
5
6 /**
7 * Runtime binding for `fis:GetExperimentTemplate`.
8 *
9 * Reads the bound {@link ExperimentTemplate}'s full definition — targets,
10 * actions, stop conditions, log and report configuration — so a runtime
11 * function can inspect the experiment it is about to start. The template id
12 * is injected from the binding. Provide the implementation with
13 * `Effect.provide(AWS.FIS.GetExperimentTemplateHttp)`.
14 * ### Inspecting Templates
15 * **Example:** Read the Bound Template's Definition
16 * ```typescript
17 * // init — bind the operation to the experiment template
18 * const getExperimentTemplate = yield* AWS.FIS.GetExperimentTemplate(template);
19 *
20 * // runtime
21 * const { experimentTemplate } = yield* getExperimentTemplate();
22 * console.log(Object.keys(experimentTemplate?.actions ?? {}));
23 * ```
24 *
25 * @binding
26 */
27 export interface GetExperimentTemplate extends Binding.Service<
28 GetExperimentTemplate,
29 "AWS.FIS.GetExperimentTemplate",
30 (
31 template: ExperimentTemplate,
32 ) => Effect.Effect<
33 () => Effect.Effect<fis.GetExperimentTemplateResponse, fis.GetExperimentTemplateError>
34 >
35 > {}
36 export const GetExperimentTemplate = Binding.Service<GetExperimentTemplate>(
37 "AWS.FIS.GetExperimentTemplate",
38 );