web_acls
Creates, updates, deletes, gets or lists a web_acls resource.
Overview
| Name | web_acls |
| Type | Resource |
| Id | aws.wafv2.web_acls |
Fields
The following fields are returned by SELECT queries:
- get_web_acl
| Name | Datatype | Description |
|---|---|---|
application_integration_url | string | The URL to use in SDK integrations with Amazon Web Services managed rule groups. For example, you can use the integration SDKs with the account takeover prevention managed rule group AWSManagedRulesATPRuleSet and the account creation fraud prevention managed rule group AWSManagedRulesACFPRuleSet. This is only populated if you are using a rule group in your web ACL that integrates with your applications in this way. For more information, see WAF client application integration in the WAF Developer Guide. |
lock_token | string | A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation. (pattern: <code>^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$</code>) |
web_acl | object | The web ACL specification. You can modify the settings in this web ACL and use it to update this web ACL or create a new one. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_web_acl | select | region | Retrieves the specified WebACL. | |
create_web_acl | insert | region, Name, Scope, DefaultAction, VisibilityConfig | Creates a WebACL per the specifications provided. A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has a statement that defines what to look for in web requests and an action that WAF applies to requests that match the statement. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types Rule, RuleGroup, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resource types include Amazon CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito user pool, App Runner service, Amplify application, Amazon Web Services Verified Access instance, and Amazon Bedrock AgentCore Gateway. | |
update_web_acl | update | region, Name, Scope, Id, DefaultAction, VisibilityConfig, LockToken | Updates the specified WebACL. While updating a web ACL, WAF provides continuous coverage to the resources that you have associated with the web ACL. This operation completely replaces the mutable specifications that you already have for the web ACL with the ones that you provide to this call. To modify a web ACL, do the following: Retrieve it by calling GetWebACL Update its settings as needed Provide the complete web ACL specification to this call A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has a statement that defines what to look for in web requests and an action that WAF applies to requests that match the statement. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types Rule, RuleGroup, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resource types include Amazon CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito user pool, App Runner service, Amplify application, Amazon Web Services Verified Access instance, and Amazon Bedrock AgentCore Gateway. Temporary inconsistencies during updates When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes. The following are examples of the temporary inconsistencies that you might notice during change propagation: After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable. After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another. After you change a rule action setting, you might see the old action in some places and the new action in others. After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another. | |
associate_web_acl | update | region, WebACLArn, ResourceArn | Associates a web ACL with a resource, to protect the resource. Use this for all resource types except for Amazon CloudFront distributions. For Amazon CloudFront, call UpdateDistribution for the distribution and provide the Amazon Resource Name (ARN) of the web ACL in the web ACL ID. For information, see UpdateDistribution in the Amazon CloudFront Developer Guide. Required permissions for customer-managed IAM policies This call requires permissions that are specific to the protected resource type. For details, see Permissions for AssociateWebACL in the WAF Developer Guide. Temporary inconsistencies during updates When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes. The following are examples of the temporary inconsistencies that you might notice during change propagation: After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable. After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another. After you change a rule action setting, you might see the old action in some places and the new action in others. After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another. | |
disassociate_web_acl | update | region, ResourceArn | Disassociates the specified resource from its web ACL association, if it has one. Use this for all resource types except for Amazon CloudFront distributions. For Amazon CloudFront, call UpdateDistribution for the distribution and provide an empty web ACL ID. For information, see UpdateDistribution in the Amazon CloudFront API Reference. Required permissions for customer-managed IAM policies This call requires permissions that are specific to the protected resource type. For details, see Permissions for DisassociateWebACL in the WAF Developer Guide. | |
delete_web_acl | delete | region | Deletes the specified WebACL. You can only use this if ManagedByFirewallManager is false in the web ACL. Before deleting any web ACL, first disassociate it from all resources. To retrieve a list of the resources that are associated with a web ACL, use the following calls: For Amazon CloudFront distributions, use the CloudFront call ListDistributionsByWebACLId. For information, see ListDistributionsByWebACLId in the Amazon CloudFront API Reference. For all other resources, call ListResourcesForWebACL. To disassociate a resource from a web ACL, use the following calls: For Amazon CloudFront distributions, provide an empty web ACL ID in the CloudFront call UpdateDistribution. For information, see UpdateDistribution in the Amazon CloudFront API Reference. For all other resources, call DisassociateWebACL. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_web_acl
Retrieves the specified WebACL.
SELECT
application_integration_url,
lock_token,
web_acl
FROM aws.wafv2.web_acls
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_web_acl
- Manifest
Creates a WebACL per the specifications provided. A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has a statement that defines what to look for in web requests and an action that WAF applies to requests that match the statement. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types Rule, RuleGroup, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resource types include Amazon CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito user pool, App Runner service, Amplify application, Amazon Web Services Verified Access instance, and Amazon Bedrock AgentCore Gateway.
INSERT INTO aws.wafv2.web_acls (
Name,
Scope,
DefaultAction,
Description,
Rules,
VisibilityConfig,
DataProtectionConfig,
Tags,
CustomResponseBodies,
CaptchaConfig,
ChallengeConfig,
TokenDomains,
AssociationConfig,
OnSourceDDoSProtectionConfig,
ApplicationConfig,
MonetizationConfig,
region
)
SELECT
'{{ Name }}' /* required */,
'{{ Scope }}' /* required */,
'{{ DefaultAction }}' /* required */,
'{{ Description }}',
'{{ Rules }}',
'{{ VisibilityConfig }}' /* required */,
'{{ DataProtectionConfig }}',
'{{ Tags }}',
'{{ CustomResponseBodies }}',
'{{ CaptchaConfig }}',
'{{ ChallengeConfig }}',
'{{ TokenDomains }}',
'{{ AssociationConfig }}',
'{{ OnSourceDDoSProtectionConfig }}',
'{{ ApplicationConfig }}',
'{{ MonetizationConfig }}',
'{{ region }}'
RETURNING
summary
;
# Description fields are for documentation purposes
- name: web_acls
props:
- name: region
value: "{{ region }}"
description: Required parameter for the web_acls resource.
- name: Name
value: "{{ Name }}"
description: |
The name of the web ACL. You cannot change the name of a web ACL after you create it.
- name: Scope
value: "{{ Scope }}"
description: |
Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use CLOUDFRONT. To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows: CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1. API and SDKs - For all calls, use the Region endpoint us-east-1.
valid_values: ['CLOUDFRONT', 'REGIONAL']
- name: DefaultAction
description: |
The action to perform if none of the Rules contained in the WebACL match.
value:
Block:
CustomResponse:
ResponseCode: {{ ResponseCode }}
CustomResponseBodyKey: "{{ CustomResponseBodyKey }}"
ResponseHeaders:
- Name: "{{ Name }}"
Value: "{{ Value }}"
Allow:
CustomRequestHandling:
InsertHeaders:
- Name: "{{ Name }}"
Value: "{{ Value }}"
- name: Description
value: "{{ Description }}"
description: |
A description of the web ACL that helps with identification.
- name: Rules
description: |
The Rule statements used to identify the web requests that you want to manage. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.
value:
- Name: "{{ Name }}"
Priority: {{ Priority }}
Statement:
ByteMatchStatement:
SearchString: "{{ SearchString }}"
FieldToMatch:
SingleHeader:
Name: "{{ Name }}"
SingleQueryArgument:
Name: "{{ Name }}"
AllQueryArguments: "{{ AllQueryArguments }}"
UriPath: "{{ UriPath }}"
QueryString: "{{ QueryString }}"
Body:
OversizeHandling: "{{ OversizeHandling }}"
Method: "{{ Method }}"
JsonBody:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
InvalidFallbackBehavior: "{{ InvalidFallbackBehavior }}"
OversizeHandling: "{{ OversizeHandling }}"
Headers:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
Cookies:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
HeaderOrder:
OversizeHandling: "{{ OversizeHandling }}"
JA3Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
JA4Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
UriFragment:
FallbackBehavior: "{{ FallbackBehavior }}"
TextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
PreParseTextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
PositionalConstraint: "{{ PositionalConstraint }}"
SqliMatchStatement:
FieldToMatch:
SingleHeader:
Name: "{{ Name }}"
SingleQueryArgument:
Name: "{{ Name }}"
AllQueryArguments: "{{ AllQueryArguments }}"
UriPath: "{{ UriPath }}"
QueryString: "{{ QueryString }}"
Body:
OversizeHandling: "{{ OversizeHandling }}"
Method: "{{ Method }}"
JsonBody:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
InvalidFallbackBehavior: "{{ InvalidFallbackBehavior }}"
OversizeHandling: "{{ OversizeHandling }}"
Headers:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
Cookies:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
HeaderOrder:
OversizeHandling: "{{ OversizeHandling }}"
JA3Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
JA4Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
UriFragment:
FallbackBehavior: "{{ FallbackBehavior }}"
TextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
PreParseTextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
SensitivityLevel: "{{ SensitivityLevel }}"
XssMatchStatement:
FieldToMatch:
SingleHeader:
Name: "{{ Name }}"
SingleQueryArgument:
Name: "{{ Name }}"
AllQueryArguments: "{{ AllQueryArguments }}"
UriPath: "{{ UriPath }}"
QueryString: "{{ QueryString }}"
Body:
OversizeHandling: "{{ OversizeHandling }}"
Method: "{{ Method }}"
JsonBody:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
InvalidFallbackBehavior: "{{ InvalidFallbackBehavior }}"
OversizeHandling: "{{ OversizeHandling }}"
Headers:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
Cookies:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
HeaderOrder:
OversizeHandling: "{{ OversizeHandling }}"
JA3Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
JA4Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
UriFragment:
FallbackBehavior: "{{ FallbackBehavior }}"
TextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
PreParseTextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
SizeConstraintStatement:
FieldToMatch:
SingleHeader:
Name: "{{ Name }}"
SingleQueryArgument:
Name: "{{ Name }}"
AllQueryArguments: "{{ AllQueryArguments }}"
UriPath: "{{ UriPath }}"
QueryString: "{{ QueryString }}"
Body:
OversizeHandling: "{{ OversizeHandling }}"
Method: "{{ Method }}"
JsonBody:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
InvalidFallbackBehavior: "{{ InvalidFallbackBehavior }}"
OversizeHandling: "{{ OversizeHandling }}"
Headers:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
Cookies:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
HeaderOrder:
OversizeHandling: "{{ OversizeHandling }}"
JA3Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
JA4Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
UriFragment:
FallbackBehavior: "{{ FallbackBehavior }}"
ComparisonOperator: "{{ ComparisonOperator }}"
Size: {{ Size }}
TextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
PreParseTextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
GeoMatchStatement:
CountryCodes:
- "{{ CountryCodes }}"
ForwardedIPConfig:
HeaderName: "{{ HeaderName }}"
FallbackBehavior: "{{ FallbackBehavior }}"
RuleGroupReferenceStatement:
ARN: "{{ ARN }}"
ExcludedRules:
- Name: "{{ Name }}"
RuleActionOverrides:
- Name: "{{ Name }}"
ActionToUse:
Block: "{{ Block }}"
Allow: "{{ Allow }}"
Count: "{{ Count }}"
Captcha: "{{ Captcha }}"
Challenge: "{{ Challenge }}"
Monetize: "{{ Monetize }}"
IPSetReferenceStatement:
ARN: "{{ ARN }}"
IPSetForwardedIPConfig:
HeaderName: "{{ HeaderName }}"
FallbackBehavior: "{{ FallbackBehavior }}"
Position: "{{ Position }}"
RegexPatternSetReferenceStatement:
ARN: "{{ ARN }}"
FieldToMatch:
SingleHeader:
Name: "{{ Name }}"
SingleQueryArgument:
Name: "{{ Name }}"
AllQueryArguments: "{{ AllQueryArguments }}"
UriPath: "{{ UriPath }}"
QueryString: "{{ QueryString }}"
Body:
OversizeHandling: "{{ OversizeHandling }}"
Method: "{{ Method }}"
JsonBody:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
InvalidFallbackBehavior: "{{ InvalidFallbackBehavior }}"
OversizeHandling: "{{ OversizeHandling }}"
Headers:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
Cookies:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
HeaderOrder:
OversizeHandling: "{{ OversizeHandling }}"
JA3Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
JA4Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
UriFragment:
FallbackBehavior: "{{ FallbackBehavior }}"
TextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
PreParseTextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
RateBasedStatement:
Limit: {{ Limit }}
EvaluationWindowSec: {{ EvaluationWindowSec }}
AggregateKeyType: "{{ AggregateKeyType }}"
ScopeDownStatement:
ByteMatchStatement:
SearchString: "{{ SearchString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
PositionalConstraint: "{{ PositionalConstraint }}"
SqliMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SensitivityLevel: "{{ SensitivityLevel }}"
XssMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SizeConstraintStatement:
FieldToMatch: "{{ FieldToMatch }}"
ComparisonOperator: "{{ ComparisonOperator }}"
Size: {{ Size }}
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
GeoMatchStatement:
CountryCodes: "{{ CountryCodes }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
RuleGroupReferenceStatement:
ARN: "{{ ARN }}"
ExcludedRules: "{{ ExcludedRules }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
IPSetReferenceStatement:
ARN: "{{ ARN }}"
IPSetForwardedIPConfig: "{{ IPSetForwardedIPConfig }}"
RegexPatternSetReferenceStatement:
ARN: "{{ ARN }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
RateBasedStatement:
Limit: {{ Limit }}
EvaluationWindowSec: {{ EvaluationWindowSec }}
AggregateKeyType: "{{ AggregateKeyType }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
CustomKeys: "{{ CustomKeys }}"
AndStatement:
Statements: "{{ Statements }}"
OrStatement:
Statements: "{{ Statements }}"
NotStatement:
Statement: "{{ Statement }}"
ManagedRuleGroupStatement:
VendorName: "{{ VendorName }}"
Name: "{{ Name }}"
Version: "{{ Version }}"
ExcludedRules: "{{ ExcludedRules }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ManagedRuleGroupConfigs: "{{ ManagedRuleGroupConfigs }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
LabelMatchStatement:
Scope: "{{ Scope }}"
Key: "{{ Key }}"
RegexMatchStatement:
RegexString: "{{ RegexString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
AsnMatchStatement:
AsnList: "{{ AsnList }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
ForwardedIPConfig:
HeaderName: "{{ HeaderName }}"
FallbackBehavior: "{{ FallbackBehavior }}"
CustomKeys:
- Header:
Name: "{{ Name }}"
TextTransformations: "{{ TextTransformations }}"
Cookie:
Name: "{{ Name }}"
TextTransformations: "{{ TextTransformations }}"
QueryArgument:
Name: "{{ Name }}"
TextTransformations: "{{ TextTransformations }}"
QueryString:
TextTransformations: "{{ TextTransformations }}"
HTTPMethod: "{{ HTTPMethod }}"
ForwardedIP: "{{ ForwardedIP }}"
IP: "{{ IP }}"
LabelNamespace:
Namespace: "{{ Namespace }}"
UriPath:
TextTransformations: "{{ TextTransformations }}"
JA3Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
JA4Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
ASN: "{{ ASN }}"
AndStatement:
Statements:
- ByteMatchStatement:
SearchString: "{{ SearchString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
PositionalConstraint: "{{ PositionalConstraint }}"
SqliMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SensitivityLevel: "{{ SensitivityLevel }}"
XssMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SizeConstraintStatement:
FieldToMatch: "{{ FieldToMatch }}"
ComparisonOperator: "{{ ComparisonOperator }}"
Size: {{ Size }}
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
GeoMatchStatement:
CountryCodes: "{{ CountryCodes }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
RuleGroupReferenceStatement:
ARN: "{{ ARN }}"
ExcludedRules: "{{ ExcludedRules }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
IPSetReferenceStatement:
ARN: "{{ ARN }}"
IPSetForwardedIPConfig: "{{ IPSetForwardedIPConfig }}"
RegexPatternSetReferenceStatement:
ARN: "{{ ARN }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
RateBasedStatement:
Limit: {{ Limit }}
EvaluationWindowSec: {{ EvaluationWindowSec }}
AggregateKeyType: "{{ AggregateKeyType }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
CustomKeys: "{{ CustomKeys }}"
AndStatement:
Statements: "{{ Statements }}"
OrStatement:
Statements: "{{ Statements }}"
NotStatement:
Statement: "{{ Statement }}"
ManagedRuleGroupStatement:
VendorName: "{{ VendorName }}"
Name: "{{ Name }}"
Version: "{{ Version }}"
ExcludedRules: "{{ ExcludedRules }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ManagedRuleGroupConfigs: "{{ ManagedRuleGroupConfigs }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
LabelMatchStatement:
Scope: "{{ Scope }}"
Key: "{{ Key }}"
RegexMatchStatement:
RegexString: "{{ RegexString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
AsnMatchStatement:
AsnList: "{{ AsnList }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
OrStatement:
Statements:
- ByteMatchStatement:
SearchString: "{{ SearchString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
PositionalConstraint: "{{ PositionalConstraint }}"
SqliMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SensitivityLevel: "{{ SensitivityLevel }}"
XssMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SizeConstraintStatement:
FieldToMatch: "{{ FieldToMatch }}"
ComparisonOperator: "{{ ComparisonOperator }}"
Size: {{ Size }}
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
GeoMatchStatement:
CountryCodes: "{{ CountryCodes }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
RuleGroupReferenceStatement:
ARN: "{{ ARN }}"
ExcludedRules: "{{ ExcludedRules }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
IPSetReferenceStatement:
ARN: "{{ ARN }}"
IPSetForwardedIPConfig: "{{ IPSetForwardedIPConfig }}"
RegexPatternSetReferenceStatement:
ARN: "{{ ARN }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
RateBasedStatement:
Limit: {{ Limit }}
EvaluationWindowSec: {{ EvaluationWindowSec }}
AggregateKeyType: "{{ AggregateKeyType }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
CustomKeys: "{{ CustomKeys }}"
AndStatement:
Statements: "{{ Statements }}"
OrStatement:
Statements: "{{ Statements }}"
NotStatement:
Statement: "{{ Statement }}"
ManagedRuleGroupStatement:
VendorName: "{{ VendorName }}"
Name: "{{ Name }}"
Version: "{{ Version }}"
ExcludedRules: "{{ ExcludedRules }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ManagedRuleGroupConfigs: "{{ ManagedRuleGroupConfigs }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
LabelMatchStatement:
Scope: "{{ Scope }}"
Key: "{{ Key }}"
RegexMatchStatement:
RegexString: "{{ RegexString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
AsnMatchStatement:
AsnList: "{{ AsnList }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
NotStatement:
Statement:
ByteMatchStatement:
SearchString: "{{ SearchString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
PositionalConstraint: "{{ PositionalConstraint }}"
SqliMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SensitivityLevel: "{{ SensitivityLevel }}"
XssMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SizeConstraintStatement:
FieldToMatch: "{{ FieldToMatch }}"
ComparisonOperator: "{{ ComparisonOperator }}"
Size: {{ Size }}
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
GeoMatchStatement:
CountryCodes: "{{ CountryCodes }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
RuleGroupReferenceStatement:
ARN: "{{ ARN }}"
ExcludedRules: "{{ ExcludedRules }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
IPSetReferenceStatement:
ARN: "{{ ARN }}"
IPSetForwardedIPConfig: "{{ IPSetForwardedIPConfig }}"
RegexPatternSetReferenceStatement:
ARN: "{{ ARN }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
RateBasedStatement:
Limit: {{ Limit }}
EvaluationWindowSec: {{ EvaluationWindowSec }}
AggregateKeyType: "{{ AggregateKeyType }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
CustomKeys: "{{ CustomKeys }}"
AndStatement:
Statements: "{{ Statements }}"
OrStatement:
Statements: "{{ Statements }}"
NotStatement:
Statement: "{{ Statement }}"
ManagedRuleGroupStatement:
VendorName: "{{ VendorName }}"
Name: "{{ Name }}"
Version: "{{ Version }}"
ExcludedRules: "{{ ExcludedRules }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ManagedRuleGroupConfigs: "{{ ManagedRuleGroupConfigs }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
LabelMatchStatement:
Scope: "{{ Scope }}"
Key: "{{ Key }}"
RegexMatchStatement:
RegexString: "{{ RegexString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
AsnMatchStatement:
AsnList: "{{ AsnList }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
ManagedRuleGroupStatement:
VendorName: "{{ VendorName }}"
Name: "{{ Name }}"
Version: "{{ Version }}"
ExcludedRules:
- Name: "{{ Name }}"
ScopeDownStatement:
ByteMatchStatement:
SearchString: "{{ SearchString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
PositionalConstraint: "{{ PositionalConstraint }}"
SqliMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SensitivityLevel: "{{ SensitivityLevel }}"
XssMatchStatement:
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
SizeConstraintStatement:
FieldToMatch: "{{ FieldToMatch }}"
ComparisonOperator: "{{ ComparisonOperator }}"
Size: {{ Size }}
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
GeoMatchStatement:
CountryCodes: "{{ CountryCodes }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
RuleGroupReferenceStatement:
ARN: "{{ ARN }}"
ExcludedRules: "{{ ExcludedRules }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
IPSetReferenceStatement:
ARN: "{{ ARN }}"
IPSetForwardedIPConfig: "{{ IPSetForwardedIPConfig }}"
RegexPatternSetReferenceStatement:
ARN: "{{ ARN }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
RateBasedStatement:
Limit: {{ Limit }}
EvaluationWindowSec: {{ EvaluationWindowSec }}
AggregateKeyType: "{{ AggregateKeyType }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
CustomKeys: "{{ CustomKeys }}"
AndStatement:
Statements: "{{ Statements }}"
OrStatement:
Statements: "{{ Statements }}"
NotStatement:
Statement: "{{ Statement }}"
ManagedRuleGroupStatement:
VendorName: "{{ VendorName }}"
Name: "{{ Name }}"
Version: "{{ Version }}"
ExcludedRules: "{{ ExcludedRules }}"
ScopeDownStatement: "{{ ScopeDownStatement }}"
ManagedRuleGroupConfigs: "{{ ManagedRuleGroupConfigs }}"
RuleActionOverrides: "{{ RuleActionOverrides }}"
LabelMatchStatement:
Scope: "{{ Scope }}"
Key: "{{ Key }}"
RegexMatchStatement:
RegexString: "{{ RegexString }}"
FieldToMatch: "{{ FieldToMatch }}"
TextTransformations: "{{ TextTransformations }}"
PreParseTextTransformations: "{{ PreParseTextTransformations }}"
AsnMatchStatement:
AsnList: "{{ AsnList }}"
ForwardedIPConfig: "{{ ForwardedIPConfig }}"
ManagedRuleGroupConfigs:
- LoginPath: "{{ LoginPath }}"
PayloadType: "{{ PayloadType }}"
UsernameField:
Identifier: "{{ Identifier }}"
PasswordField:
Identifier: "{{ Identifier }}"
AWSManagedRulesBotControlRuleSet:
InspectionLevel: "{{ InspectionLevel }}"
EnableMachineLearning: {{ EnableMachineLearning }}
AWSManagedRulesATPRuleSet:
LoginPath: "{{ LoginPath }}"
RequestInspection: "{{ RequestInspection }}"
ResponseInspection: "{{ ResponseInspection }}"
EnableRegexInPath: {{ EnableRegexInPath }}
AWSManagedRulesACFPRuleSet:
CreationPath: "{{ CreationPath }}"
RegistrationPagePath: "{{ RegistrationPagePath }}"
RequestInspection: "{{ RequestInspection }}"
ResponseInspection: "{{ ResponseInspection }}"
EnableRegexInPath: {{ EnableRegexInPath }}
AWSManagedRulesAntiDDoSRuleSet:
ClientSideActionConfig: "{{ ClientSideActionConfig }}"
SensitivityToBlock: "{{ SensitivityToBlock }}"
RuleActionOverrides:
- Name: "{{ Name }}"
ActionToUse:
Block: "{{ Block }}"
Allow: "{{ Allow }}"
Count: "{{ Count }}"
Captcha: "{{ Captcha }}"
Challenge: "{{ Challenge }}"
Monetize: "{{ Monetize }}"
LabelMatchStatement:
Scope: "{{ Scope }}"
Key: "{{ Key }}"
RegexMatchStatement:
RegexString: "{{ RegexString }}"
FieldToMatch:
SingleHeader:
Name: "{{ Name }}"
SingleQueryArgument:
Name: "{{ Name }}"
AllQueryArguments: "{{ AllQueryArguments }}"
UriPath: "{{ UriPath }}"
QueryString: "{{ QueryString }}"
Body:
OversizeHandling: "{{ OversizeHandling }}"
Method: "{{ Method }}"
JsonBody:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
InvalidFallbackBehavior: "{{ InvalidFallbackBehavior }}"
OversizeHandling: "{{ OversizeHandling }}"
Headers:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
Cookies:
MatchPattern: "{{ MatchPattern }}"
MatchScope: "{{ MatchScope }}"
OversizeHandling: "{{ OversizeHandling }}"
HeaderOrder:
OversizeHandling: "{{ OversizeHandling }}"
JA3Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
JA4Fingerprint:
FallbackBehavior: "{{ FallbackBehavior }}"
UriFragment:
FallbackBehavior: "{{ FallbackBehavior }}"
TextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
PreParseTextTransformations:
- Priority: {{ Priority }}
Type: "{{ Type }}"
AsnMatchStatement:
AsnList:
- {{ AsnList }}
ForwardedIPConfig:
HeaderName: "{{ HeaderName }}"
FallbackBehavior: "{{ FallbackBehavior }}"
Action:
Block:
CustomResponse:
ResponseCode: {{ ResponseCode }}
CustomResponseBodyKey: "{{ CustomResponseBodyKey }}"
ResponseHeaders:
- Name: "{{ Name }}"
Value: "{{ Value }}"
Allow:
CustomRequestHandling:
InsertHeaders:
- Name: "{{ Name }}"
Value: "{{ Value }}"
Count:
CustomRequestHandling:
InsertHeaders:
- Name: "{{ Name }}"
Value: "{{ Value }}"
Captcha:
CustomRequestHandling:
InsertHeaders:
- Name: "{{ Name }}"
Value: "{{ Value }}"
Challenge:
CustomRequestHandling:
InsertHeaders:
- Name: "{{ Name }}"
Value: "{{ Value }}"
Monetize:
PriceMultiplier: "{{ PriceMultiplier }}"
OverrideAction:
Count:
CustomRequestHandling:
InsertHeaders:
- Name: "{{ Name }}"
Value: "{{ Value }}"
None: "{{ None }}"
RuleLabels: "{{ RuleLabels }}"
VisibilityConfig:
SampledRequestsEnabled: {{ SampledRequestsEnabled }}
CloudWatchMetricsEnabled: {{ CloudWatchMetricsEnabled }}
MetricName: "{{ MetricName }}"
CaptchaConfig:
ImmunityTimeProperty:
ImmunityTime: {{ ImmunityTime }}
ChallengeConfig:
ImmunityTimeProperty:
ImmunityTime: {{ ImmunityTime }}
- name: VisibilityConfig
description: |
Defines and enables Amazon CloudWatch metrics and web request sample collection.
value:
SampledRequestsEnabled: {{ SampledRequestsEnabled }}
CloudWatchMetricsEnabled: {{ CloudWatchMetricsEnabled }}
MetricName: "{{ MetricName }}"
- name: DataProtectionConfig
description: |
Specifies data protection to apply to the web request data for the web ACL. This is a web ACL level data protection option. The data protection that you configure for the web ACL alters the data that's available for any other data collection activity, including your WAF logging destinations, web ACL request sampling, and Amazon Security Lake data collection and management. Your other option for data protection is in the logging configuration, which only affects logging.
value:
DataProtections:
- Field:
FieldType: "{{ FieldType }}"
FieldKeys:
- "{{ FieldKeys }}"
Action: "{{ Action }}"
ExcludeRuleMatchDetails: {{ ExcludeRuleMatchDetails }}
ExcludeRateBasedDetails: {{ ExcludeRateBasedDetails }}
- name: Tags
description: |
An array of key:value pairs to associate with the resource.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: CustomResponseBodies
value: "{{ CustomResponseBodies }}"
description: |
A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL. For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide. For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
- name: CaptchaConfig
description: |
Specifies how WAF should handle CAPTCHA evaluations for rules that don't have their own CaptchaConfig settings. If you don't specify this, WAF uses its default settings for CaptchaConfig.
value:
ImmunityTimeProperty:
ImmunityTime: {{ ImmunityTime }}
- name: ChallengeConfig
description: |
Specifies how WAF should handle challenge evaluations for rules that don't have their own ChallengeConfig settings. If you don't specify this, WAF uses its default settings for ChallengeConfig.
value:
ImmunityTimeProperty:
ImmunityTime: {{ ImmunityTime }}
- name: TokenDomains
value:
- "{{ TokenDomains }}"
description: |
Specifies the domains that WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When WAF provides a token, it uses the domain of the Amazon Web Services resource that the web ACL is protecting. If you don't specify a list of token domains, WAF accepts tokens only for the domain of the protected resource. With a token domain list, WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains. Example JSON: "TokenDomains": { "mywebsite.com", "myotherwebsite.com" } Public suffixes aren't allowed. For example, you can't use gov.au or co.uk as token domains.
- name: AssociationConfig
description: |
Specifies custom configurations for the associations between the web ACL and protected resources. Use this to customize the maximum size of the request body that your protected resources forward to WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes). You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see WAF Pricing. For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).
value:
RequestBody: "{{ RequestBody }}"
- name: OnSourceDDoSProtectionConfig
description: |
Specifies the type of DDoS protection to apply to web request data for a web ACL. For most scenarios, it is recommended to use the default protection level, ACTIVE_UNDER_DDOS. If a web ACL is associated with multiple Application Load Balancers, the changes you make to DDoS protection in that web ACL will apply to all associated Application Load Balancers.
value:
ALBLowReputationMode: "{{ ALBLowReputationMode }}"
- name: ApplicationConfig
description: |
Configures the ability for the WAF console to store and retrieve application attributes during the web ACL creation process. Application attributes help WAF give recommendations for protection packs.
value:
Attributes:
- Name: "{{ Name }}"
Values: "{{ Values }}"
- name: MonetizationConfig
description: |
The monetization configuration for the web ACL. Provide this when any rule in the web ACL uses the Monetize action.
value:
CryptoConfig:
PaymentNetworks:
- Chain: "{{ Chain }}"
WalletAddress: "{{ WalletAddress }}"
Prices: "{{ Prices }}"
CurrencyMode: "{{ CurrencyMode }}"
UPDATE examples
- update_web_acl
- associate_web_acl
- disassociate_web_acl
Updates the specified WebACL. While updating a web ACL, WAF provides continuous coverage to the resources that you have associated with the web ACL. This operation completely replaces the mutable specifications that you already have for the web ACL with the ones that you provide to this call. To modify a web ACL, do the following: Retrieve it by calling GetWebACL Update its settings as needed Provide the complete web ACL specification to this call A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has a statement that defines what to look for in web requests and an action that WAF applies to requests that match the statement. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types Rule, RuleGroup, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resource types include Amazon CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito user pool, App Runner service, Amplify application, Amazon Web Services Verified Access instance, and Amazon Bedrock AgentCore Gateway. Temporary inconsistencies during updates When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes. The following are examples of the temporary inconsistencies that you might notice during change propagation: After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable. After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another. After you change a rule action setting, you might see the old action in some places and the new action in others. After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another.
UPDATE aws.wafv2.web_acls
SET
Name = '{{ Name }}',
Scope = '{{ Scope }}',
Id = '{{ Id }}',
DefaultAction = '{{ DefaultAction }}',
Description = '{{ Description }}',
Rules = '{{ Rules }}',
VisibilityConfig = '{{ VisibilityConfig }}',
DataProtectionConfig = '{{ DataProtectionConfig }}',
LockToken = '{{ LockToken }}',
CustomResponseBodies = '{{ CustomResponseBodies }}',
CaptchaConfig = '{{ CaptchaConfig }}',
ChallengeConfig = '{{ ChallengeConfig }}',
TokenDomains = '{{ TokenDomains }}',
AssociationConfig = '{{ AssociationConfig }}',
OnSourceDDoSProtectionConfig = '{{ OnSourceDDoSProtectionConfig }}',
ApplicationConfig = '{{ ApplicationConfig }}',
MonetizationConfig = '{{ MonetizationConfig }}'
WHERE
region = '{{ region }}' --required
AND Name = '{{ Name }}' --required
AND Scope = '{{ Scope }}' --required
AND Id = '{{ Id }}' --required
AND DefaultAction = '{{ DefaultAction }}' --required
AND VisibilityConfig = '{{ VisibilityConfig }}' --required
AND LockToken = '{{ LockToken }}' --required
RETURNING
next_lock_token;
Associates a web ACL with a resource, to protect the resource. Use this for all resource types except for Amazon CloudFront distributions. For Amazon CloudFront, call UpdateDistribution for the distribution and provide the Amazon Resource Name (ARN) of the web ACL in the web ACL ID. For information, see UpdateDistribution in the Amazon CloudFront Developer Guide. Required permissions for customer-managed IAM policies This call requires permissions that are specific to the protected resource type. For details, see Permissions for AssociateWebACL in the WAF Developer Guide. Temporary inconsistencies during updates When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes. The following are examples of the temporary inconsistencies that you might notice during change propagation: After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable. After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another. After you change a rule action setting, you might see the old action in some places and the new action in others. After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another.
UPDATE aws.wafv2.web_acls
SET
WebACLArn = '{{ WebACLArn }}',
ResourceArn = '{{ ResourceArn }}'
WHERE
region = '{{ region }}' --required
AND WebACLArn = '{{ WebACLArn }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required;
Disassociates the specified resource from its web ACL association, if it has one. Use this for all resource types except for Amazon CloudFront distributions. For Amazon CloudFront, call UpdateDistribution for the distribution and provide an empty web ACL ID. For information, see UpdateDistribution in the Amazon CloudFront API Reference. Required permissions for customer-managed IAM policies This call requires permissions that are specific to the protected resource type. For details, see Permissions for DisassociateWebACL in the WAF Developer Guide.
UPDATE aws.wafv2.web_acls
SET
ResourceArn = '{{ ResourceArn }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required;
DELETE examples
- delete_web_acl
Deletes the specified WebACL. You can only use this if ManagedByFirewallManager is false in the web ACL. Before deleting any web ACL, first disassociate it from all resources. To retrieve a list of the resources that are associated with a web ACL, use the following calls: For Amazon CloudFront distributions, use the CloudFront call ListDistributionsByWebACLId. For information, see ListDistributionsByWebACLId in the Amazon CloudFront API Reference. For all other resources, call ListResourcesForWebACL. To disassociate a resource from a web ACL, use the following calls: For Amazon CloudFront distributions, provide an empty web ACL ID in the CloudFront call UpdateDistribution. For information, see UpdateDistribution in the Amazon CloudFront API Reference. For all other resources, call DisassociateWebACL.
DELETE FROM aws.wafv2.web_acls
WHERE region = '{{ region }}' --required
;