GetInvestigationGroupPolicy
Source:
src/AWS/AIOps/GetInvestigationGroupPolicy.ts
Runtime binding for aiops:GetInvestigationGroupPolicy.
Reads the IAM resource policy attached to the bound
InvestigationGroup (the policy that lets principals like
aiops.alarms.cloudwatch.amazonaws.com create investigations), returned
as a JSON string. Fails with the typed ResourceNotFoundException when no
policy is attached. The group’s ARN is injected from the binding. Provide
the implementation with
Effect.provide(AWS.AIOps.GetInvestigationGroupPolicyHttp).
Reading the Resource Policy
Section titled “Reading the Resource Policy”// init — grants aiops:GetInvestigationGroupPolicy on the groupconst getInvestigationGroupPolicy = yield* AWS.AIOps.GetInvestigationGroupPolicy(group);
// runtime — no policy attached surfaces as a typed errorconst attached = yield* getInvestigationGroupPolicy().pipe( Effect.map((r) => r.policy), Effect.catchTag("ResourceNotFoundException", () => Effect.succeed(undefined), ),);