Back to all operators
ForAllValues:BoolIfExists
ForAllValues:BoolIfExists
compares a list of booleans in a request to a boolean in your policy.
To match a request, the context key can be absent, but if it is present, all of the booleans in the request must match the boolean in your policy.
You can use policy variables in the value of this operator.
Warning
ForAllValues:BoolIfExists is actively confusing. Any operator starting with ForAllValues ignores IfExists — it is not evaluated against the entire array, only against a single value at a time inside the ForAllValues loop. Use ForAllValues:Bool instead so your coworkers don't hate you.
ForAllValues:BoolIfExists in an Allow Statement
| Policy Condition | Request Context | Result |
|---|---|---|
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: null | ✓ Allowed Assuming no explicit Deny elsewhere |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | − Not Allowed Statement does not apply |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | − Not Allowed Statement does not apply |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | ✓ Allowed Assuming no explicit Deny elsewhere |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | ✓ Allowed Assuming no explicit Deny elsewhere |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | − Not Allowed Statement does not apply |
ForAllValues:BoolIfExists in a Deny Statement
| Policy Condition | Request Context | Result |
|---|---|---|
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: null | ✕ Denied |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | − Not Denied May be allowed by another statement |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | − Not Denied May be allowed by another statement |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | ✕ Denied |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | ✕ Denied |
"ForAllValues:BoolIfExists": { | apigateway:Resource/ApiKeyRequired: | − Not Denied May be allowed by another statement |

