Back to all operators

ForAllValues:StringNotLike

ForAllValues:StringNotLike

compares a list of strings in a request to a list of strings in your policy. The policy values can include asterisks (*) to match multiple characters and question marks (?) to match a single character. The comparison is case sensitive.

To match a request, the context key can be absent, but if it is present, none of the strings in the request can match any string strings in your policy.

You can use policy variables in the value of this operator.

ForAllValues:StringNotLike in an Allow Statement

Simulate in IAM Simulate
Policy ConditionRequest ContextResult
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys: null✓ Allowed Assuming no explicit Deny elsewhere
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - Owner:Legal
 - State:NY
− Not Allowed Statement does not apply
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - Owner:Legal
 - owner:Legal
− Not Allowed Statement does not apply
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - owner:Legal
✓ Allowed Assuming no explicit Deny elsewhere
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - owner:Legal
 - State:NewYork
✓ Allowed Assuming no explicit Deny elsewhere
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - owner:Legal
 - State:NewYork
 - Owner:Legal
− Not Allowed Statement does not apply

ForAllValues:StringNotLike in a Deny Statement

Simulate in IAM Simulate
Policy ConditionRequest ContextResult
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys: null✕ Denied
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - Owner:Legal
 - State:NY
− Not Denied May be allowed by another statement
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - Owner:Legal
 - owner:Legal
− Not Denied May be allowed by another statement
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - owner:Legal
✕ Denied
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - owner:Legal
 - State:NewYork
✕ Denied
"ForAllValues:StringNotLike": {
"aws:TagKeys": [
"Owner:*",
"State:??"
]
}
aws:TagKeys:
 - owner:Legal
 - State:NewYork
 - Owner:Legal
− Not Denied May be allowed by another statement