GetPermissionPolicy
Source:
src/AWS/WAFv2/GetPermissionPolicy.ts
Runtime binding for wafv2:GetPermissionPolicy — read the IAM policy
that shares the bound RuleGroup with other accounts; the rule
group ARN is injected automatically. A rule group with no policy
attached fails with the typed WAFNonexistentItemException.
Provide WAFv2.GetPermissionPolicyHttp on the hosting Lambda Function to
satisfy the requirement.
Sharing Rule Groups
Section titled “Sharing Rule Groups”// init — grants wafv2:GetPermissionPolicy on the rule groupconst getPermissionPolicy = yield* AWS.WAFv2.GetPermissionPolicy(group);
// runtimeconst { Policy } = yield* getPermissionPolicy().pipe( Effect.catchTag("WAFNonexistentItemException", () => Effect.succeed({ Policy: undefined }), ),);