Skip to content

ListInsights

Source: src/AWS/DevOpsGuru/ListInsights.ts

Runtime binding for devops-guru:ListInsights.

Lists the account’s insights filtered by status (ongoing, closed, or any within a time range) and type (reactive/proactive). Provide the implementation with Effect.provide(AWS.DevOpsGuru.ListInsightsHttp).

// init — account-level binding, no resource argument
const listInsights = yield* AWS.DevOpsGuru.ListInsights();
// runtime
const { ReactiveInsights } = yield* listInsights({
StatusFilter: { Ongoing: { Type: "REACTIVE" } },
});
yield* Effect.log(`ongoing: ${ReactiveInsights?.length}`);