Actions, resources, and condition keys for AWS WAF
AWS WAF (service prefix: waf) provides the following
service-specific operations, resources, actions, and condition keys for use in IAM permission
policies.
References:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
-
View the programmatic service authorization reference
for this service.
Topics
API operations defined by AWS WAF
The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.
| Operation | IAM action | Condition key | Possible value(s) | Access level |
|---|---|---|---|---|
|
CreateByteMatchSet |
Write |
|||
|
CreateGeoMatchSet |
Write |
|||
|
CreateIPSet |
Write |
|||
|
CreateRateBasedRule |
Write |
|||
Tagging, Write |
||||
|
CreateRegexMatchSet |
Write |
|||
|
CreateRegexPatternSet |
Write |
|||
|
CreateRule |
Write |
|||
Tagging, Write |
||||
|
CreateRuleGroup |
Write |
|||
Tagging, Write |
||||
|
CreateSizeConstraintSet |
Write |
|||
|
CreateSqlInjectionMatchSet |
Write |
|||
|
CreateWebACL |
Permissions management, Write |
|||
Tagging, Write |
||||
|
CreateWebACLMigrationStack |
Write |
|||
|
CreateXssMatchSet |
Write |
|||
|
DeleteByteMatchSet |
Write |
|||
|
DeleteGeoMatchSet |
Write |
|||
|
DeleteIPSet |
Write |
|||
|
DeleteLoggingConfiguration |
Write |
|||
|
DeletePermissionPolicy |
Permissions management, Write |
|||
|
DeleteRateBasedRule |
Write |
|||
|
DeleteRegexMatchSet |
Write |
|||
|
DeleteRegexPatternSet |
Write |
|||
|
DeleteRule |
Write |
|||
|
DeleteRuleGroup |
Write |
|||
|
DeleteSizeConstraintSet |
Write |
|||
|
DeleteSqlInjectionMatchSet |
Write |
|||
|
DeleteWebACL |
Permissions management, Write |
|||
|
DeleteXssMatchSet |
Write |
|||
|
GetByteMatchSet |
Read |
|||
|
GetChangeToken |
Read |
|||
|
GetChangeTokenStatus |
Read |
|||
|
GetGeoMatchSet |
Read |
|||
|
GetIPSet |
Read |
|||
|
GetLoggingConfiguration |
Read |
|||
|
GetPermissionPolicy |
Read |
|||
|
GetRateBasedRule |
Read |
|||
|
GetRateBasedRuleManagedKeys |
Read |
|||
|
GetRegexMatchSet |
Read |
|||
|
GetRegexPatternSet |
Read |
|||
|
GetRule |
Read |
|||
|
GetRuleGroup |
Read |
|||
|
GetSampledRequests |
Read |
|||
|
GetSizeConstraintSet |
Read |
|||
|
GetSqlInjectionMatchSet |
Read |
|||
|
GetWebACL |
Read |
|||
|
GetXssMatchSet |
Read |
|||
|
ListActivatedRulesInRuleGroup |
List |
|||
|
ListByteMatchSets |
List |
|||
|
ListGeoMatchSets |
List |
|||
|
ListIPSets |
List |
|||
|
ListLoggingConfigurations |
List |
|||
|
ListRateBasedRules |
List |
|||
|
ListRegexMatchSets |
List |
|||
|
ListRegexPatternSets |
List |
|||
|
ListRuleGroups |
List |
|||
|
ListRules |
List |
|||
|
ListSizeConstraintSets |
List |
|||
|
ListSqlInjectionMatchSets |
List |
|||
|
ListSubscribedRuleGroups |
List |
|||
|
ListTagsForResource |
Read |
|||
|
ListWebACLs |
List |
|||
|
ListXssMatchSets |
List |
|||
|
PutLoggingConfiguration |
Write |
|||
|
PutPermissionPolicy |
Permissions management, Write |
|||
|
TagResource |
Tagging, Write |
|||
|
UntagResource |
Tagging, Write |
|||
|
UpdateByteMatchSet |
Write |
|||
|
UpdateGeoMatchSet |
Write |
|||
|
UpdateIPSet |
Write |
|||
|
UpdateRateBasedRule |
Write |
|||
|
UpdateRegexMatchSet |
Write |
|||
|
UpdateRegexPatternSet |
Write |
|||
|
UpdateRule |
Write |
|||
|
UpdateRuleGroup |
Write |
|||
|
UpdateSizeConstraintSet |
Write |
|||
|
UpdateSqlInjectionMatchSet |
Write |
|||
|
UpdateWebACL |
Permissions management, Write |
|||
|
UpdateXssMatchSet |
Write |
Actions defined by AWS WAF
You can specify the following actions in the Action element of an IAM
policy statement. Use policies to grant permissions to perform an operation in AWS. When
you use an action in a policy, you usually allow or deny access to the API operation or CLI
command with the same name. However, in some cases, a single action controls access to more
than one operation. Alternatively, some operations require several different actions.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to create a ByteMatchSet |
Write |
|||
Grants permission to create a GeoMatchSet |
Write |
|||
Grants permission to create an IPSet |
Write |
|||
Grants permission to create a RateBasedRule for limiting the volume of requests from a single IP address |
Write |
|||
Grants permission to create a RegexMatchSet |
Write |
|||
Grants permission to create a RegexPatternSet |
Write |
|||
Grants permission to create a Rule for filtering web requests |
Write |
|||
Grants permission to create a RuleGroup, which is a collection of predefined rules that you can use in a WebACL |
Write |
|||
Grants permission to create a SizeConstraintSet |
Write |
|||
Grants permission to create an SqlInjectionMatchSet |
Write |
|||
Grants permission to create a WebACL, which contains rules for filtering web requests |
Permissions management, Write |
|||
Grants permission to create a CloudFormation web ACL template in an S3 bucket for the purposes of migrating the web ACL from AWS WAF Classic to AWS WAF v2 |
Write |
|||
Grants permission to create an XssMatchSet, which you use to detect requests that contain cross-site scripting attacks |
Write |
|||
Grants permission to delete a ByteMatchSet |
Write |
|||
Grants permission to delete a GeoMatchSet |
Write |
|||
Grants permission to delete an IPSet |
Write |
|||
Grants permission to delete the LoggingConfiguration from a web ACL |
Write |
|||
Grants permission to delete an IAM policy from a rule group |
Permissions management, Write |
|||
Grants permission to delete a RateBasedRule |
Write |
|||
Grants permission to delete a RegexMatchSet |
Write |
|||
Grants permission to delete a RegexPatternSet |
Write |
|||
Grants permission to delete a Rule |
Write |
|||
Grants permission to delete a RuleGroup |
Write |
|||
Grants permission to delete a SizeConstraintSet |
Write |
|||
Grants permission to delete an SqlInjectionMatchSet |
Write |
|||
Grants permission to delete a WebACL |
Permissions management, Write |
|||
Grants permission to delete an XssMatchSet |
Write |
|||
Grants permission to retrieve a ByteMatchSet |
Read |
|||
Grants permission to retrieve a change token to use in create, update, and delete requests |
Read |
|||
Grants permission to retrieve the status of a change token |
Read |
|||
Grants permission to retrieve a GeoMatchSet |
Read |
|||
Grants permission to retrieve an IPSet |
Read |
|||
Grants permission to retrieve a LoggingConfiguration for a web ACL |
Read |
|||
Grants permission to retrieve an IAM policy for a rule group |
Read |
|||
Grants permission to retrieve a RateBasedRule |
Read |
|||
Grants permission to retrieve the array of IP addresses that are currently being blocked by a RateBasedRule |
Read |
|||
Grants permission to retrieve a RegexMatchSet |
Read |
|||
Grants permission to retrieve a RegexPatternSet |
Read |
|||
Grants permission to retrieve a Rule |
Read |
|||
Grants permission to retrieve a RuleGroup |
Read |
|||
Grants permission to retrieve detailed information about a sample set of web requests |
Read |
|||
Grants permission to retrieve a SizeConstraintSet |
Read |
|||
Grants permission to retrieve an SqlInjectionMatchSet |
Read |
|||
Grants permission to retrieve a WebACL |
Read |
|||
Grants permission to retrieve an XssMatchSet |
Read |
|||
Grants permission to retrieve an array of ActivatedRule objects |
List |
|||
Grants permission to retrieve an array of ByteMatchSetSummary objects |
List |
|||
Grants permission to retrieve an array of GeoMatchSetSummary objects |
List |
|||
Grants permission to retrieve an array of IPSetSummary objects |
List |
|||
Grants permission to retrieve an array of LoggingConfiguration objects |
List |
|||
Grants permission to retrieve an array of RuleSummary objects |
List |
|||
Grants permission to retrieve an array of RegexMatchSetSummary objects |
List |
|||
Grants permission to retrieve an array of RegexPatternSetSummary objects |
List |
|||
Grants permission to retrieve an array of RuleGroup objects |
List |
|||
Grants permission to retrieve an array of RuleSummary objects |
List |
|||
Grants permission to retrieve an array of SizeConstraintSetSummary objects |
List |
|||
Grants permission to retrieve an array of SqlInjectionMatchSet objects |
List |
|||
Grants permission to retrieve an array of RuleGroup objects that you are subscribed to |
List |
|||
Grants permission to retrieve the tags for a resource |
Read |
|||
Grants permission to retrieve an array of WebACLSummary objects |
List |
|||
Grants permission to retrieve an array of XssMatchSet objects |
List |
|||
Grants permission to associate a LoggingConfiguration with a specified web ACL |
Write |
|||
Grants permission to attach an IAM policy to a rule group, to share the rule group between accounts |
Permissions management, Write |
|||
Grants permission to add a Tag to a resource |
Tagging, Write |
|||
Grants permission to remove a Tag from a resource |
Tagging, Write |
|||
Grants permission to insert or delete ByteMatchTuple objects in a ByteMatchSet |
Write |
|||
Grants permission to insert or delete GeoMatchConstraint objects in a GeoMatchSet |
Write |
|||
Grants permission to insert or delete IPSetDescriptor objects in an IPSet |
Write |
|||
Grants permission to modify a rate based rule |
Write |
|||
Grants permission to insert or delete RegexMatchTuple objects in a RegexMatchSet |
Write |
|||
Grants permission to insert or delete RegexPatternStrings in a RegexPatternSet |
Write |
|||
Grants permission to modify a Rule |
Write |
|||
Grants permission to insert or delete ActivatedRule objects in a RuleGroup |
Write |
|||
Grants permission to insert or delete SizeConstraint objects in a SizeConstraintSet |
Write |
|||
Grants permission to insert or delete SqlInjectionMatchTuple objects in an SqlInjectionMatchSet |
Write |
|||
Grants permission to insert or delete ActivatedRule objects in a WebACL |
Permissions management, Write |
|||
Grants permission to insert or delete XssMatchTuple objects in an XssMatchSet |
Write |
Resource types defined by AWS WAF
The following resource types are defined by this service and can be used in the
Resource element of IAM permission policy statements.
| Resource types | ARN | Condition keys |
|---|---|---|
arn:${Partition}:waf::${Account}:bytematchset/${Id} |
||
arn:${Partition}:waf::${Account}:geomatchset/${Id} |
||
arn:${Partition}:waf::${Account}:ipset/${Id} |
||
arn:${Partition}:waf::${Account}:ratebasedrule/${Id} |
||
arn:${Partition}:waf::${Account}:regexmatch/${Id} |
||
arn:${Partition}:waf::${Account}:regexpatternset/${Id} |
||
arn:${Partition}:waf::${Account}:rule/${Id} |
||
arn:${Partition}:waf::${Account}:rulegroup/${Id} |
||
arn:${Partition}:waf::${Account}:sizeconstraintset/${Id} |
||
arn:${Partition}:waf::${Account}:sqlinjectionset/${Id} |
||
arn:${Partition}:waf::${Account}:webacl/${Id} |
||
arn:${Partition}:waf::${Account}:xssmatchset/${Id} |
Condition keys for AWS WAF
AWS WAF defines the following condition keys that can be used in the
Condition element of an IAM policy.
| Condition keys | Description | Type |
|---|---|---|
Filters actions based on the allowed set of values for each of the tags |
String |
|
Filters actions based on tag-value associated with the resource |
String |
|
Filters actions based on the presence of mandatory tags in the request |
ArrayOfString |