Skip to content

GetInsight

Source: src/AWS/XRay/GetInsight.ts

Retrieve the summary information of an X-Ray insight — the anomaly details X-Ray detected for a group with insights enabled.

Bind the operation in the function’s init phase to get a runtime callable; provide the implementation with Effect.provide(XRay.GetInsightHttp). The action is account-scoped: X-Ray does not support resource-level permissions for xray:GetInsight, so the binding grants it on *.

import * as XRay from "alchemy/AWS/XRay";
// init — grants xray:GetInsight
const getInsight = yield* XRay.GetInsight();
// runtime
const result = yield* getInsight({ InsightId: insightId });
const state = result.Insight?.State;