Actions, resources, and condition keys for AWS WAF V2 - AWS Identity and Access Management

Actions, resources, and condition keys for AWS WAF V2

Tip

This page is moving to a new location on November 16, 2020. Please update your bookmark to use the new page at https://docs.aws.amazon.com/service-authorization/latest/reference/list_awswafv2.html.

AWS WAF V2 (service prefix: wafv2) provides the following service-specific resources, actions, and condition context keys for use in IAM permission policies.

References:

Actions defined by AWS WAF V2

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.

The Resource types column indicates whether each action supports resource-level permissions. If there is no value for this column, you must specify all resources ("*") in the Resource element of your policy statement. If the column includes a resource type, then you can specify an ARN of that type in a statement with that action. Required resources are indicated in the table with an asterisk (*). If you specify a resource-level permission ARN in a statement using this action, then it must be of this type. Some actions support multiple resource types. If the resource type is optional (not indicated as required), then you can choose to use one but not the other.

For details about the columns in the following table, see The actions table.

Actions Description Access level Resource types (*required) Condition keys Dependent actions
AssociateWebACL Grants permission to associate a WebACL with a resource. Write

webacl*

apigateway

appsync

loadbalancer/app/

CheckCapacity Grants permission to calculate web ACL capacity unit (WCU) requirements for a specified scope and set of rules. Read
CreateIPSet Grants permission to create an IPSet. Write

ipset*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateRegexPatternSet Grants permission to create a RegexPatternSet. Write

regexpatternset*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateRuleGroup Grants permission to create a RuleGroup. Write

rulegroup*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateWebACL Grants permission to create a WebACL. Permissions management

webacl*

aws:RequestTag/${TagKey}

aws:TagKeys

DeleteFirewallManagerRuleGroups Grants permission to delete specified FirewallManagedRulesGroups from the specified WebACL if not managed by Firewall Manager anymore. Write

webacl*

DeleteIPSet Grants permission to delete the specified IPSet. Write

ipset*

DeleteLoggingConfiguration Grants permission to delete the LoggingConfiguration from the specified WebACL. Write

webacl*

DeletePermissionPolicy Grants permission to delete the PermissionPolicy on the specified RuleGroup. Permissions management

rulegroup*

DeleteRegexPatternSet Grants permission to delete the specified RegexPatternSet. Write

regexpatternset*

DeleteRuleGroup Grants permission to delete the specified RuleGroup. Write

rulegroup*

DeleteWebACL Grants permission to delete the specified WebACL. Permissions management

webacl*

DescribeManagedRuleGroup Grants permission to view high-level information for a managed rule group. List
DisassociateFirewallManager [permission only] Grants permission to disassociate Firewall Manager from the specified WebACL. Write

webacl*

DisassociateWebACL Grants permission disassociate a WebACL from an application resource. Write

apigateway

appsync

loadbalancer/app/

GetIPSet Grants permission to view details about the specified IPSet. Read

ipset*

aws:ResourceTag/${TagKey}

GetLoggingConfiguration Grants permission to view LoggingConfiguration about the specified WebACL. Read

webacl*

aws:ResourceTag/${TagKey}

GetPermissionPolicy Grants permission to view PermissionPolicy on the specified RuleGroup. Read

rulegroup*

GetRateBasedStatementManagedKeys Grants permission to view the keys that are currently blocked by a rate-based rule. Read

webacl*

aws:ResourceTag/${TagKey}

GetRegexPatternSet Grants permission to view details about the specified RegexPatternSet. Read

regexpatternset*

aws:ResourceTag/${TagKey}

GetRuleGroup Grants permission to view details about the specified RuleGroup. Read

rulegroup*

aws:ResourceTag/${TagKey}

GetSampledRequests Grants permission to view detailed information about a specified number of requests--a sample--that AWS WAF randomly selects from among the first 5,000 requests that your AWS resource received during a time range that you choose. Read

webacl*

GetWebACL Grants permission to view details about the specified GetWebACL. Read

webacl*

aws:ResourceTag/${TagKey}

GetWebACLForResource Grants permission to view the WebACL for the specified resource. Read

apigateway

appsync

loadbalancer/app/

ListAvailableManagedRuleGroups Grants permission to view an array of managed rule groups that are available for you to use. List
ListIPSets Grants permission to view an array of IPSetSummary objects for the IP sets that you manage. List
ListLoggingConfigurations Grants permission to view an array of your LoggingConfiguration objects. List
ListRegexPatternSets Grants permission to view an array of RegexPatternSetSummary objects for the regex pattern sets that you manage. List
ListResourcesForWebACL Grants permission to view an array of the Amazon Resource Names (ARNs) for the resources that are associated with the specified web ACL. List

webacl*

ListRuleGroups Grants permission to view an array of RuleGroupSummary objects for the rule groups that you manage. List
ListTagsForResource Grants permission to lists tag for the specified resource. Read

ipset

regexpatternset

rulegroup

webacl

aws:ResourceTag/${TagKey}

ListWebACLs Grants permission to view an array of WebACLSummary objects for the web ACLs that you manage. List
PutFirewallManagerRuleGroups [permission only] Grants permission to create FirewallManagedRulesGroups in the specified WebACL. Write

webacl*

PutLoggingConfiguration Grants permission to enables the specified LoggingConfiguration, to start logging from a web ACL. Write

webacl*

iam:CreateServiceLinkedRole

PutPermissionPolicy Grants permission to attach the specified IAM policy to the specified resource. The only supported use for this action is to share a RuleGroup across accounts. Permissions management

rulegroup*

TagResource Grants permission to associates tags with the specified AWS resource. Tagging

ipset

regexpatternset

rulegroup

webacl

aws:TagKeys

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

UntagResource Grants permission to disassociates tags from an AWS resource. Tagging

ipset

regexpatternset

rulegroup

webacl

aws:TagKeys

UpdateIPSet Grants permission to update the specified IPSet. Write

ipset*

aws:ResourceTag/${TagKey}

UpdateRegexPatternSet Grants permission to update the specified RegexPatternSet. Write

regexpatternset*

aws:ResourceTag/${TagKey}

UpdateRuleGroup Grants permission to update the specified RuleGroup. Write

rulegroup*

aws:ResourceTag/${TagKey}

UpdateWebACL Grants permission to update the specified WebACL. Permissions management

webacl*

aws:ResourceTag/${TagKey}

Resource types defined by AWS WAF V2

The following resource types are defined by this service and can be used in the Resource element of IAM permission policy statements. Each action in the Actions table identifies the resource types that can be specified with that action. A resource type can also define which condition keys you can include in a policy. These keys are displayed in the last column of the table. For details about the columns in the following table, see The resource types table.

Resource types ARN Condition keys
webacl arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}

aws:ResourceTag/${TagKey}

ipset arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/ipset/${Name}/${Id}

aws:ResourceTag/${TagKey}

rulegroup arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/rulegroup/${Name}/${Id}

aws:ResourceTag/${TagKey}

regexpatternset arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/regexpatternset/${Name}/${Id}

aws:ResourceTag/${TagKey}

loadbalancer/app/ arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/app/${LoadBalancerName}/${LoadBalancerId}
apigateway arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages/${StageName}
appsync arn:${Partition}:appsync:${Region}:${Account}:apis/${GraphQLAPIId}

Condition keys for AWS WAF V2

AWS WAF V2 defines the following condition keys that can be used in the Condition element of an IAM policy. You can use these keys to further refine the conditions under which the policy statement applies. For details about the columns in the following table, see The condition keys table.

To view the global condition keys that are available to all services, see Available global condition keys.

Condition keys Description Type
aws:RequestTag/${TagKey} Filters actions based on the allowed set of values for each of the tags String
aws:ResourceTag/${TagKey} Filters actions based on tag-value assoicated with the resource String
aws:TagKeys Filters actions based on the presence of mandatory tags in the request String