Skip to content

GetContextKeysForCustomPolicy

Source: src/AWS/IAM/GetContextKeysForCustomPolicy.ts

Runtime binding for iam:GetContextKeysForCustomPolicy — list the condition context keys (aws:username, aws:SourceIp, …) referenced by a set of candidate policy documents, so a simulation can be primed with the right ContextEntries.

The policies are supplied as strings per request, so the binding takes no arguments and grants iam:GetContextKeysForCustomPolicy on *. Provide the implementation with Effect.provide(AWS.IAM.GetContextKeysForCustomPolicyHttp).

// init
const getContextKeys = yield* IAM.GetContextKeysForCustomPolicy();
// runtime
const { ContextKeyNames } = yield* getContextKeys({
PolicyInputList: [policyJson],
});