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

main
ts 39 lines 1.44 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:StartExperiment`.
8 *
9 * Starts a fault-injection experiment from the bound
10 * {@link ExperimentTemplate} — the template's id is injected and the
11 * idempotency `clientToken` is generated automatically. The IAM grant covers
12 * both the template and the `experiment/*` ARN the started experiment is
13 * created under. Provide the implementation with
14 * `Effect.provide(AWS.FIS.StartExperimentHttp)`.
15 * ### Running Experiments
16 * **Example:** Start an Experiment from the Bound Template
17 * ```typescript
18 * // init — bind the operation to the experiment template
19 * const startExperiment = yield* AWS.FIS.StartExperiment(template);
20 *
21 * // runtime
22 * const { experiment } = yield* startExperiment();
23 * console.log(experiment?.id, experiment?.state?.status);
24 * ```
25 *
26 * @binding
27 */
28 export interface StartExperiment extends Binding.Service<
29 StartExperiment,
30 "AWS.FIS.StartExperiment",
31 (
32 template: ExperimentTemplate,
33 ) => Effect.Effect<
34 (
35 request?: Omit<fis.StartExperimentRequest, "experimentTemplateId" | "clientToken">,
36 ) => Effect.Effect<fis.StartExperimentResponse, fis.StartExperimentError>
37 >
38 > {}
39 export const StartExperiment = Binding.Service<StartExperiment>("AWS.FIS.StartExperiment");