Actions, resources, and condition keys for AWS WAF V2 - Service Authorization Reference

Actions, resources, and condition keys for AWS WAF V2

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 of the Actions table indicates whether each action supports resource-level permissions. If there is no value for this column, you must specify all resources ("*") to which the policy applies 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. If the action has one or more required resources, the caller must have permission to use the action with those resources. Required resources are indicated in the table with an asterisk (*). If you limit resource access with the Resource element in an IAM policy, you must include an ARN or pattern for each required resource type. Some actions support multiple resource types. If the resource type is optional (not indicated as required), then you can choose to use one of the optional resource types.

The Condition keys column of the Actions table includes keys that you can specify in a policy statement's Condition element. For more information on the condition keys that are associated with resources for the service, see the Condition keys column of the Resource types table.

Note

Resource condition keys are listed in the Resource types table. You can find a link to the resource type that applies to an action in the Resource types (*required) column of the Actions table. The resource type in the Resource types table includes the Condition keys column, which are the resource condition keys that apply to an action in the Actions table.

For details about the columns in the following table, see 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:SetWebACL

apprunner:AssociateWebAcl

appsync:SetWebACL

cognito-idp:AssociateWebACL

ec2:AssociateVerifiedAccessInstanceWebAcl

elasticloadbalancing:SetWebAcl

apigateway

apprunner

appsync

loadbalancer/app/

userpool

verified-access-instance

CheckCapacity Grants permission to calculate web ACL capacity unit (WCU) requirements for a specified scope and set of rules Read
CreateAPIKey Grants permission to create an API key for use in the integration of the CAPTCHA API in your JavaScript client applications Write
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*

ipset

regexpatternset

aws:RequestTag/${TagKey}

aws:TagKeys

CreateWebACL Grants permission to create a WebACL Write

webacl*

ipset

managedruleset

regexpatternset

rulegroup

aws:RequestTag/${TagKey}

aws:TagKeys

DeleteAPIKey Grants permission to delete an API key Write
DeleteFirewallManagerRuleGroups Grants permission to delete FirewallManagedRulesGroups from a WebACL if not managed by Firewall Manager anymore Write

webacl*

DeleteIPSet Grants permission to delete an IPSet Write

ipset*

DeleteLoggingConfiguration Grants permission to delete the LoggingConfiguration from a WebACL Write

webacl*

wafv2:LogScope

DeletePermissionPolicy Grants permission to delete the PermissionPolicy on a RuleGroup Permissions management

rulegroup*

DeleteRegexPatternSet Grants permission to delete a RegexPatternSet Write

regexpatternset*

DeleteRuleGroup Grants permission to delete a RuleGroup Write

rulegroup*

DeleteWebACL Grants permission to delete a WebACL Write

webacl*

DescribeAllManagedProducts Grants permission to retrieve product information for a managed rule group Read
DescribeManagedProductsByVendor Grants permission to retrieve product information for a managed rule group by a given vendor Read
DescribeManagedRuleGroup Grants permission to retrieve high-level information for a managed rule group Read
DisassociateFirewallManager [permission only] Grants permission to disassociate Firewall Manager from a WebACL Write

webacl*

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

apigateway

apigateway:SetWebACL

apprunner:DisassociateWebAcl

appsync:SetWebACL

cognito-idp:DisassociateWebACL

ec2:DisassociateVerifiedAccessInstanceWebAcl

elasticloadbalancing:SetWebAcl

apprunner

appsync

loadbalancer/app/

userpool

verified-access-instance

GenerateMobileSdkReleaseUrl Grants permission to generate a presigned download URL for the specified release of the mobile SDK Read
GetDecryptedAPIKey Grants permission to return your API key in decrypted form. Use this to check the token domains that you have defined for the key Read
GetIPSet Grants permission to retrieve details about an IPSet Read

ipset*

aws:ResourceTag/${TagKey}

GetLoggingConfiguration Grants permission to retrieve LoggingConfiguration for a WebACL Read

webacl*

aws:ResourceTag/${TagKey}

wafv2:LogScope

GetManagedRuleSet Grants permission to retrieve details about a ManagedRuleSet Read

managedruleset*

GetMobileSdkRelease Grants permission to retrieve information for the specified mobile SDK release, including release notes and tags Read
GetPermissionPolicy Grants permission to retrieve a PermissionPolicy for a RuleGroup Read

rulegroup*

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

webacl*

aws:ResourceTag/${TagKey}

GetRegexPatternSet Grants permission to retrieve details about a RegexPatternSet Read

regexpatternset*

aws:ResourceTag/${TagKey}

GetRuleGroup Grants permission to retrieve details about a RuleGroup Read

rulegroup*

aws:ResourceTag/${TagKey}

GetSampledRequests Grants permission to retrieve detailed information about a sampling of web requests Read

webacl*

GetWebACL Grants permission to retrieve details about a WebACL Read

webacl*

aws:ResourceTag/${TagKey}

GetWebACLForResource Grants permission to retrieve the WebACL that's associated with a resource Read

webacl*

apprunner:DescribeWebAclForService

cognito-idp:GetWebACLForResource

ec2:GetVerifiedAccessInstanceWebAcl

wafv2:GetWebACL

apigateway

apprunner

appsync

loadbalancer/app/

userpool

verified-access-instance

ListAPIKeys Grants permission to retrieve a list of the API keys that you've defined for the specified scope List
ListAvailableManagedRuleGroupVersions Grants permission to retrieve an array of managed rule group versions that are available for you to use List
ListAvailableManagedRuleGroups Grants permission to retrieve an array of managed rule groups that are available for you to use List
ListIPSets Grants permission to retrieve an array of IPSetSummary objects for the IP sets that you manage List
ListLoggingConfigurations Grants permission to retrieve an array of your LoggingConfiguration objects List

wafv2:LogScope

ListManagedRuleSets Grants permission to retrieve an array of your ManagedRuleSet objects List
ListMobileSdkReleases Grants permission to retrieve a list of the available releases for the mobile SDK and the specified device platform List
ListRegexPatternSets Grants permission to retrieve an array of RegexPatternSetSummary objects for the regex pattern sets that you manage List
ListResourcesForWebACL Grants permission to retrieve an array of the Amazon Resource Names (ARNs) for the resources that are associated with a web ACL List

webacl*

apprunner:ListAssociatedServicesForWebAcl

cognito-idp:ListResourcesForWebACL

ec2:DescribeVerifiedAccessInstanceWebAclAssociations

apprunner

userpool

verified-access-instance

ListRuleGroups Grants permission to retrieve an array of RuleGroupSummary objects for the rule groups that you manage List
ListTagsForResource Grants permission to list tags for a resource Read

ipset

regexpatternset

rulegroup

webacl

aws:ResourceTag/${TagKey}

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

webacl*

PutLoggingConfiguration Grants permission to enable a LoggingConfiguration, to start logging for a web ACL Write

webacl*

iam:CreateServiceLinkedRole

wafv2:LogScope

wafv2:LogDestinationResource

PutManagedRuleSetVersions Grants permission to enable create a new or update an existing version of a ManagedRuleSet Write

managedruleset*

rulegroup*

PutPermissionPolicy Grants permission to attach an IAM policy to a resource, used to share rule groups between accounts Permissions management

rulegroup*

TagResource Grants permission to associate tags with a AWS resource Tagging

ipset

regexpatternset

rulegroup

webacl

aws:TagKeys

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

UntagResource Grants permission to disassociate tags from an AWS resource Tagging

ipset

regexpatternset

rulegroup

webacl

aws:TagKeys

UpdateIPSet Grants permission to update an IPSet Write

ipset*

aws:ResourceTag/${TagKey}

UpdateManagedRuleSetVersionExpiryDate Grants permission to update the expiry date of a version in ManagedRuleSet Write

managedruleset*

UpdateRegexPatternSet Grants permission to update a RegexPatternSet Write

regexpatternset*

aws:ResourceTag/${TagKey}

UpdateRuleGroup Grants permission to update a RuleGroup Write

rulegroup*

ipset

regexpatternset

aws:ResourceTag/${TagKey}

UpdateWebACL Grants permission to update a WebACL Write

webacl*

ipset

managedruleset

regexpatternset

rulegroup

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 Resource types table. For details about the columns in the following table, see 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}

managedruleset arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/managedruleset/${Name}/${Id}
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}
userpool arn:${Partition}:cognito-idp:${Region}:${Account}:userpool/${UserPoolId}
apprunner arn:${Partition}:apprunner:${Region}:${Account}:service/${ServiceName}/${ServiceId}
verified-access-instance arn:${Partition}:ec2:${Region}:${Account}:verified-access-instance/${VerifiedAccessInstanceId}

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 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 access by the allowed set of values for each of the tags String
aws:ResourceTag/${TagKey} Filters access by tag-value associated with the resource String
aws:TagKeys Filters access by the presence of mandatory tags in the request ArrayOfString
wafv2:LogDestinationResource Filters access by log destination ARN for PutLoggingConfiguration API ARN
wafv2:LogScope Filters access by log scope for Logging Configuration API String