Skip to content

ListExperiments

Source: src/AWS/FIS/ListExperiments.ts

Runtime binding for fis:ListExperiments.

Enumerates the account’s experiments, optionally filtered to those started from a specific template — the building block of a chaos-run dashboard or a guard that refuses to start a new experiment while one is already running. Provide the implementation with Effect.provide(AWS.FIS.ListExperimentsHttp).

// init — account-level binding, no resource argument
const listExperiments = yield* AWS.FIS.ListExperiments();
// runtime
const { experiments } = yield* listExperiments({
experimentTemplateId: templateId,
});
const running = (experiments ?? []).filter(
(e) => e.state?.status === "running",
);