CfnWebACLProps

class aws_cdk.aws_wafv2.CfnWebACLProps(*, default_action, scope, visibility_config, captcha_config=None, challenge_config=None, custom_response_bodies=None, description=None, name=None, rules=None, tags=None, token_domains=None)

Bases: object

Properties for defining a CfnWebACL.

Parameters:
  • default_action (Union[IResolvable, DefaultActionProperty, Dict[str, Any]]) – The action to perform if none of the Rules contained in the WebACL match.

  • scope (str) – Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, or an AWS App Runner service. Valid Values are CLOUDFRONT and REGIONAL . .. epigraph:: For CLOUDFRONT , you must create your WAFv2 resources in the US East (N. Virginia) Region, us-east-1 . For information about how to define the association of the web ACL with your resource, see WebACLAssociation .

  • visibility_config (Union[IResolvable, VisibilityConfigProperty, Dict[str, Any]]) – Defines and enables Amazon CloudWatch metrics and web request sample collection.

  • captcha_config (Union[IResolvable, CaptchaConfigProperty, Dict[str, Any], None]) – Specifies how AWS WAF should handle CAPTCHA evaluations for rules that don’t have their own CaptchaConfig settings. If you don’t specify this, AWS WAF uses its default settings for CaptchaConfig .

  • challenge_config (Union[IResolvable, ChallengeConfigProperty, Dict[str, Any], None]) – Specifies how AWS WAF should handle challenge evaluations for rules that don’t have their own ChallengeConfig settings. If you don’t specify this, AWS WAF uses its default settings for ChallengeConfig .

  • custom_response_bodies (Union[IResolvable, Mapping[str, Union[IResolvable, CustomResponseBodyProperty, Dict[str, Any]]], None]) – 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 AWS WAF in the AWS WAF Developer Guide . For information about the limits on count and size for custom request and response settings, see AWS WAF quotas in the AWS WAF Developer Guide .

  • description (Optional[str]) – A description of the web ACL that helps with identification.

  • name (Optional[str]) – The name of the web ACL. You cannot change the name of a web ACL after you create it.

  • rules (Union[IResolvable, Sequence[Union[IResolvable, RuleProperty, Dict[str, Any]]], None]) – The rule statements used to identify the web requests that you want to allow, block, or count. Each rule includes one top-level statement that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as “environment”) and the tag value represents a specific value within that category (such as “test,” “development,” or “production”). You can add up to 50 tags to each AWS resource. .. epigraph:: To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.

  • token_domains (Optional[Sequence[str]]) – Specifies the domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don’t specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource’s host domain plus all domains in the token domain list, including their prefixed subdomains.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_wafv2 as wafv2

# all: Any
# all_query_arguments: Any
# count: Any
# method: Any
# none: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# statement_property_: wafv2.CfnWebACL.StatementProperty
# uri_path: Any

cfn_web_aCLProps = wafv2.CfnWebACLProps(
    default_action=wafv2.CfnWebACL.DefaultActionProperty(
        allow=wafv2.CfnWebACL.AllowActionProperty(
            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                    name="name",
                    value="value"
                )]
            )
        ),
        block=wafv2.CfnWebACL.BlockActionProperty(
            custom_response=wafv2.CfnWebACL.CustomResponseProperty(
                response_code=123,

                # the properties below are optional
                custom_response_body_key="customResponseBodyKey",
                response_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                    name="name",
                    value="value"
                )]
            )
        )
    ),
    scope="scope",
    visibility_config=wafv2.CfnWebACL.VisibilityConfigProperty(
        cloud_watch_metrics_enabled=False,
        metric_name="metricName",
        sampled_requests_enabled=False
    ),

    # the properties below are optional
    captcha_config=wafv2.CfnWebACL.CaptchaConfigProperty(
        immunity_time_property=wafv2.CfnWebACL.ImmunityTimePropertyProperty(
            immunity_time=123
        )
    ),
    challenge_config=wafv2.CfnWebACL.ChallengeConfigProperty(
        immunity_time_property=wafv2.CfnWebACL.ImmunityTimePropertyProperty(
            immunity_time=123
        )
    ),
    custom_response_bodies={
        "custom_response_bodies_key": wafv2.CfnWebACL.CustomResponseBodyProperty(
            content="content",
            content_type="contentType"
        )
    },
    description="description",
    name="name",
    rules=[wafv2.CfnWebACL.RuleProperty(
        name="name",
        priority=123,
        statement=wafv2.CfnWebACL.StatementProperty(
            and_statement=wafv2.CfnWebACL.AndStatementProperty(
                statements=[statement_property_]
            ),
            byte_match_statement=wafv2.CfnWebACL.ByteMatchStatementProperty(
                field_to_match=wafv2.CfnWebACL.FieldToMatchProperty(
                    all_query_arguments=all_query_arguments,
                    body=wafv2.CfnWebACL.BodyProperty(
                        oversize_handling="oversizeHandling"
                    ),
                    cookies=wafv2.CfnWebACL.CookiesProperty(
                        match_pattern=wafv2.CfnWebACL.CookieMatchPatternProperty(
                            all=all,
                            excluded_cookies=["excludedCookies"],
                            included_cookies=["includedCookies"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    headers=wafv2.CfnWebACL.HeadersProperty(
                        match_pattern=wafv2.CfnWebACL.HeaderMatchPatternProperty(
                            all=all,
                            excluded_headers=["excludedHeaders"],
                            included_headers=["includedHeaders"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    json_body=wafv2.CfnWebACL.JsonBodyProperty(
                        match_pattern=wafv2.CfnWebACL.JsonMatchPatternProperty(
                            all=all,
                            included_paths=["includedPaths"]
                        ),
                        match_scope="matchScope",

                        # the properties below are optional
                        invalid_fallback_behavior="invalidFallbackBehavior",
                        oversize_handling="oversizeHandling"
                    ),
                    method=method,
                    query_string=query_string,
                    single_header=single_header,
                    single_query_argument=single_query_argument,
                    uri_path=uri_path
                ),
                positional_constraint="positionalConstraint",
                text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
                    priority=123,
                    type="type"
                )],

                # the properties below are optional
                search_string="searchString",
                search_string_base64="searchStringBase64"
            ),
            geo_match_statement=wafv2.CfnWebACL.GeoMatchStatementProperty(
                country_codes=["countryCodes"],
                forwarded_ip_config=wafv2.CfnWebACL.ForwardedIPConfigurationProperty(
                    fallback_behavior="fallbackBehavior",
                    header_name="headerName"
                )
            ),
            ip_set_reference_statement={
                "arn": "arn",

                # the properties below are optional
                "ip_set_forwarded_ip_config": {
                    "fallback_behavior": "fallbackBehavior",
                    "header_name": "headerName",
                    "position": "position"
                }
            },
            label_match_statement=wafv2.CfnWebACL.LabelMatchStatementProperty(
                key="key",
                scope="scope"
            ),
            managed_rule_group_statement=wafv2.CfnWebACL.ManagedRuleGroupStatementProperty(
                name="name",
                vendor_name="vendorName",

                # the properties below are optional
                excluded_rules=[wafv2.CfnWebACL.ExcludedRuleProperty(
                    name="name"
                )],
                managed_rule_group_configs=[wafv2.CfnWebACL.ManagedRuleGroupConfigProperty(
                    aws_managed_rules_atp_rule_set=wafv2.CfnWebACL.AWSManagedRulesATPRuleSetProperty(
                        login_path="loginPath",

                        # the properties below are optional
                        request_inspection=wafv2.CfnWebACL.RequestInspectionProperty(
                            password_field=wafv2.CfnWebACL.FieldIdentifierProperty(
                                identifier="identifier"
                            ),
                            payload_type="payloadType",
                            username_field=wafv2.CfnWebACL.FieldIdentifierProperty(
                                identifier="identifier"
                            )
                        ),
                        response_inspection=wafv2.CfnWebACL.ResponseInspectionProperty(
                            body_contains=wafv2.CfnWebACL.ResponseInspectionBodyContainsProperty(
                                failure_strings=["failureStrings"],
                                success_strings=["successStrings"]
                            ),
                            header=wafv2.CfnWebACL.ResponseInspectionHeaderProperty(
                                failure_values=["failureValues"],
                                name="name",
                                success_values=["successValues"]
                            ),
                            json=wafv2.CfnWebACL.ResponseInspectionJsonProperty(
                                failure_values=["failureValues"],
                                identifier="identifier",
                                success_values=["successValues"]
                            ),
                            status_code=wafv2.CfnWebACL.ResponseInspectionStatusCodeProperty(
                                failure_codes=[123],
                                success_codes=[123]
                            )
                        )
                    ),
                    aws_managed_rules_bot_control_rule_set=wafv2.CfnWebACL.AWSManagedRulesBotControlRuleSetProperty(
                        inspection_level="inspectionLevel"
                    ),
                    login_path="loginPath",
                    password_field=wafv2.CfnWebACL.FieldIdentifierProperty(
                        identifier="identifier"
                    ),
                    payload_type="payloadType",
                    username_field=wafv2.CfnWebACL.FieldIdentifierProperty(
                        identifier="identifier"
                    )
                )],
                rule_action_overrides=[wafv2.CfnWebACL.RuleActionOverrideProperty(
                    action_to_use=wafv2.CfnWebACL.RuleActionProperty(
                        allow=wafv2.CfnWebACL.AllowActionProperty(
                            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        ),
                        block=wafv2.CfnWebACL.BlockActionProperty(
                            custom_response=wafv2.CfnWebACL.CustomResponseProperty(
                                response_code=123,

                                # the properties below are optional
                                custom_response_body_key="customResponseBodyKey",
                                response_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        ),
                        captcha=wafv2.CfnWebACL.CaptchaActionProperty(
                            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        ),
                        challenge=wafv2.CfnWebACL.ChallengeActionProperty(
                            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        ),
                        count=wafv2.CfnWebACL.CountActionProperty(
                            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        )
                    ),
                    name="name"
                )],
                scope_down_statement=statement_property_,
                version="version"
            ),
            not_statement=wafv2.CfnWebACL.NotStatementProperty(
                statement=statement_property_
            ),
            or_statement=wafv2.CfnWebACL.OrStatementProperty(
                statements=[statement_property_]
            ),
            rate_based_statement=wafv2.CfnWebACL.RateBasedStatementProperty(
                aggregate_key_type="aggregateKeyType",
                limit=123,

                # the properties below are optional
                forwarded_ip_config=wafv2.CfnWebACL.ForwardedIPConfigurationProperty(
                    fallback_behavior="fallbackBehavior",
                    header_name="headerName"
                ),
                scope_down_statement=statement_property_
            ),
            regex_match_statement=wafv2.CfnWebACL.RegexMatchStatementProperty(
                field_to_match=wafv2.CfnWebACL.FieldToMatchProperty(
                    all_query_arguments=all_query_arguments,
                    body=wafv2.CfnWebACL.BodyProperty(
                        oversize_handling="oversizeHandling"
                    ),
                    cookies=wafv2.CfnWebACL.CookiesProperty(
                        match_pattern=wafv2.CfnWebACL.CookieMatchPatternProperty(
                            all=all,
                            excluded_cookies=["excludedCookies"],
                            included_cookies=["includedCookies"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    headers=wafv2.CfnWebACL.HeadersProperty(
                        match_pattern=wafv2.CfnWebACL.HeaderMatchPatternProperty(
                            all=all,
                            excluded_headers=["excludedHeaders"],
                            included_headers=["includedHeaders"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    json_body=wafv2.CfnWebACL.JsonBodyProperty(
                        match_pattern=wafv2.CfnWebACL.JsonMatchPatternProperty(
                            all=all,
                            included_paths=["includedPaths"]
                        ),
                        match_scope="matchScope",

                        # the properties below are optional
                        invalid_fallback_behavior="invalidFallbackBehavior",
                        oversize_handling="oversizeHandling"
                    ),
                    method=method,
                    query_string=query_string,
                    single_header=single_header,
                    single_query_argument=single_query_argument,
                    uri_path=uri_path
                ),
                regex_string="regexString",
                text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
                    priority=123,
                    type="type"
                )]
            ),
            regex_pattern_set_reference_statement=wafv2.CfnWebACL.RegexPatternSetReferenceStatementProperty(
                arn="arn",
                field_to_match=wafv2.CfnWebACL.FieldToMatchProperty(
                    all_query_arguments=all_query_arguments,
                    body=wafv2.CfnWebACL.BodyProperty(
                        oversize_handling="oversizeHandling"
                    ),
                    cookies=wafv2.CfnWebACL.CookiesProperty(
                        match_pattern=wafv2.CfnWebACL.CookieMatchPatternProperty(
                            all=all,
                            excluded_cookies=["excludedCookies"],
                            included_cookies=["includedCookies"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    headers=wafv2.CfnWebACL.HeadersProperty(
                        match_pattern=wafv2.CfnWebACL.HeaderMatchPatternProperty(
                            all=all,
                            excluded_headers=["excludedHeaders"],
                            included_headers=["includedHeaders"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    json_body=wafv2.CfnWebACL.JsonBodyProperty(
                        match_pattern=wafv2.CfnWebACL.JsonMatchPatternProperty(
                            all=all,
                            included_paths=["includedPaths"]
                        ),
                        match_scope="matchScope",

                        # the properties below are optional
                        invalid_fallback_behavior="invalidFallbackBehavior",
                        oversize_handling="oversizeHandling"
                    ),
                    method=method,
                    query_string=query_string,
                    single_header=single_header,
                    single_query_argument=single_query_argument,
                    uri_path=uri_path
                ),
                text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
                    priority=123,
                    type="type"
                )]
            ),
            rule_group_reference_statement=wafv2.CfnWebACL.RuleGroupReferenceStatementProperty(
                arn="arn",

                # the properties below are optional
                excluded_rules=[wafv2.CfnWebACL.ExcludedRuleProperty(
                    name="name"
                )],
                rule_action_overrides=[wafv2.CfnWebACL.RuleActionOverrideProperty(
                    action_to_use=wafv2.CfnWebACL.RuleActionProperty(
                        allow=wafv2.CfnWebACL.AllowActionProperty(
                            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        ),
                        block=wafv2.CfnWebACL.BlockActionProperty(
                            custom_response=wafv2.CfnWebACL.CustomResponseProperty(
                                response_code=123,

                                # the properties below are optional
                                custom_response_body_key="customResponseBodyKey",
                                response_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        ),
                        captcha=wafv2.CfnWebACL.CaptchaActionProperty(
                            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        ),
                        challenge=wafv2.CfnWebACL.ChallengeActionProperty(
                            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        ),
                        count=wafv2.CfnWebACL.CountActionProperty(
                            custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                                insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                                    name="name",
                                    value="value"
                                )]
                            )
                        )
                    ),
                    name="name"
                )]
            ),
            size_constraint_statement=wafv2.CfnWebACL.SizeConstraintStatementProperty(
                comparison_operator="comparisonOperator",
                field_to_match=wafv2.CfnWebACL.FieldToMatchProperty(
                    all_query_arguments=all_query_arguments,
                    body=wafv2.CfnWebACL.BodyProperty(
                        oversize_handling="oversizeHandling"
                    ),
                    cookies=wafv2.CfnWebACL.CookiesProperty(
                        match_pattern=wafv2.CfnWebACL.CookieMatchPatternProperty(
                            all=all,
                            excluded_cookies=["excludedCookies"],
                            included_cookies=["includedCookies"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    headers=wafv2.CfnWebACL.HeadersProperty(
                        match_pattern=wafv2.CfnWebACL.HeaderMatchPatternProperty(
                            all=all,
                            excluded_headers=["excludedHeaders"],
                            included_headers=["includedHeaders"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    json_body=wafv2.CfnWebACL.JsonBodyProperty(
                        match_pattern=wafv2.CfnWebACL.JsonMatchPatternProperty(
                            all=all,
                            included_paths=["includedPaths"]
                        ),
                        match_scope="matchScope",

                        # the properties below are optional
                        invalid_fallback_behavior="invalidFallbackBehavior",
                        oversize_handling="oversizeHandling"
                    ),
                    method=method,
                    query_string=query_string,
                    single_header=single_header,
                    single_query_argument=single_query_argument,
                    uri_path=uri_path
                ),
                size=123,
                text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
                    priority=123,
                    type="type"
                )]
            ),
            sqli_match_statement=wafv2.CfnWebACL.SqliMatchStatementProperty(
                field_to_match=wafv2.CfnWebACL.FieldToMatchProperty(
                    all_query_arguments=all_query_arguments,
                    body=wafv2.CfnWebACL.BodyProperty(
                        oversize_handling="oversizeHandling"
                    ),
                    cookies=wafv2.CfnWebACL.CookiesProperty(
                        match_pattern=wafv2.CfnWebACL.CookieMatchPatternProperty(
                            all=all,
                            excluded_cookies=["excludedCookies"],
                            included_cookies=["includedCookies"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    headers=wafv2.CfnWebACL.HeadersProperty(
                        match_pattern=wafv2.CfnWebACL.HeaderMatchPatternProperty(
                            all=all,
                            excluded_headers=["excludedHeaders"],
                            included_headers=["includedHeaders"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    json_body=wafv2.CfnWebACL.JsonBodyProperty(
                        match_pattern=wafv2.CfnWebACL.JsonMatchPatternProperty(
                            all=all,
                            included_paths=["includedPaths"]
                        ),
                        match_scope="matchScope",

                        # the properties below are optional
                        invalid_fallback_behavior="invalidFallbackBehavior",
                        oversize_handling="oversizeHandling"
                    ),
                    method=method,
                    query_string=query_string,
                    single_header=single_header,
                    single_query_argument=single_query_argument,
                    uri_path=uri_path
                ),
                text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
                    priority=123,
                    type="type"
                )],

                # the properties below are optional
                sensitivity_level="sensitivityLevel"
            ),
            xss_match_statement=wafv2.CfnWebACL.XssMatchStatementProperty(
                field_to_match=wafv2.CfnWebACL.FieldToMatchProperty(
                    all_query_arguments=all_query_arguments,
                    body=wafv2.CfnWebACL.BodyProperty(
                        oversize_handling="oversizeHandling"
                    ),
                    cookies=wafv2.CfnWebACL.CookiesProperty(
                        match_pattern=wafv2.CfnWebACL.CookieMatchPatternProperty(
                            all=all,
                            excluded_cookies=["excludedCookies"],
                            included_cookies=["includedCookies"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    headers=wafv2.CfnWebACL.HeadersProperty(
                        match_pattern=wafv2.CfnWebACL.HeaderMatchPatternProperty(
                            all=all,
                            excluded_headers=["excludedHeaders"],
                            included_headers=["includedHeaders"]
                        ),
                        match_scope="matchScope",
                        oversize_handling="oversizeHandling"
                    ),
                    json_body=wafv2.CfnWebACL.JsonBodyProperty(
                        match_pattern=wafv2.CfnWebACL.JsonMatchPatternProperty(
                            all=all,
                            included_paths=["includedPaths"]
                        ),
                        match_scope="matchScope",

                        # the properties below are optional
                        invalid_fallback_behavior="invalidFallbackBehavior",
                        oversize_handling="oversizeHandling"
                    ),
                    method=method,
                    query_string=query_string,
                    single_header=single_header,
                    single_query_argument=single_query_argument,
                    uri_path=uri_path
                ),
                text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
                    priority=123,
                    type="type"
                )]
            )
        ),
        visibility_config=wafv2.CfnWebACL.VisibilityConfigProperty(
            cloud_watch_metrics_enabled=False,
            metric_name="metricName",
            sampled_requests_enabled=False
        ),

        # the properties below are optional
        action=wafv2.CfnWebACL.RuleActionProperty(
            allow=wafv2.CfnWebACL.AllowActionProperty(
                custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                    insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                        name="name",
                        value="value"
                    )]
                )
            ),
            block=wafv2.CfnWebACL.BlockActionProperty(
                custom_response=wafv2.CfnWebACL.CustomResponseProperty(
                    response_code=123,

                    # the properties below are optional
                    custom_response_body_key="customResponseBodyKey",
                    response_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                        name="name",
                        value="value"
                    )]
                )
            ),
            captcha=wafv2.CfnWebACL.CaptchaActionProperty(
                custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                    insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                        name="name",
                        value="value"
                    )]
                )
            ),
            challenge=wafv2.CfnWebACL.ChallengeActionProperty(
                custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                    insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                        name="name",
                        value="value"
                    )]
                )
            ),
            count=wafv2.CfnWebACL.CountActionProperty(
                custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
                    insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
                        name="name",
                        value="value"
                    )]
                )
            )
        ),
        captcha_config=wafv2.CfnWebACL.CaptchaConfigProperty(
            immunity_time_property=wafv2.CfnWebACL.ImmunityTimePropertyProperty(
                immunity_time=123
            )
        ),
        challenge_config=wafv2.CfnWebACL.ChallengeConfigProperty(
            immunity_time_property=wafv2.CfnWebACL.ImmunityTimePropertyProperty(
                immunity_time=123
            )
        ),
        override_action=wafv2.CfnWebACL.OverrideActionProperty(
            count=count,
            none=none
        ),
        rule_labels=[wafv2.CfnWebACL.LabelProperty(
            name="name"
        )]
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    token_domains=["tokenDomains"]
)

Attributes

captcha_config

Specifies how AWS WAF should handle CAPTCHA evaluations for rules that don’t have their own CaptchaConfig settings.

If you don’t specify this, AWS WAF uses its default settings for CaptchaConfig .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-captchaconfig

challenge_config

Specifies how AWS WAF should handle challenge evaluations for rules that don’t have their own ChallengeConfig settings.

If you don’t specify this, AWS WAF uses its default settings for ChallengeConfig .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-challengeconfig

custom_response_bodies

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 AWS WAF in the AWS WAF Developer Guide .

For information about the limits on count and size for custom request and response settings, see AWS WAF quotas in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-customresponsebodies

default_action

The action to perform if none of the Rules contained in the WebACL match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-defaultaction

description

A description of the web ACL that helps with identification.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-description

name

The name of the web ACL.

You cannot change the name of a web ACL after you create it.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-name

rules

The rule statements used to identify the web requests that you want to allow, block, or count.

Each rule includes one top-level statement that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-rules

scope

Specifies whether this is for an Amazon CloudFront distribution or for a regional application.

A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, or an AWS App Runner service. Valid Values are CLOUDFRONT and REGIONAL . .. epigraph:

For ``CLOUDFRONT`` , you must create your WAFv2 resources in the US East (N. Virginia) Region, ``us-east-1`` .

For information about how to define the association of the web ACL with your resource, see WebACLAssociation .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-scope

tags

value pairs associated with an AWS resource.

The key:value pair can be anything you define. Typically, the tag key represents a category (such as “environment”) and the tag value represents a specific value within that category (such as “test,” “development,” or “production”). You can add up to 50 tags to each AWS resource. .. epigraph:

To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-tags

Type:

Key

token_domains

Specifies the domains that AWS WAF should accept in a web request token.

This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don’t specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource’s host domain plus all domains in the token domain list, including their prefixed subdomains.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-tokendomains

visibility_config

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html#cfn-wafv2-webacl-visibilityconfig