CfnWebACL

class aws_cdk.aws_wafv2.CfnWebACL(scope_, id, *, 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: CfnResource

A CloudFormation AWS::WAFv2::WebACL.

This is the latest version of AWS WAF , named AWS WAF V2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide .

Use an WebACL to define a collection of rules to use to inspect and control web requests. Each rule has an action defined (allow, block, or count) for requests that match the statement of the rule. In the web ACL, you specify a default action to take (allow, block) for any request that doesn’t match any of the rules. The rules in a web ACL can contain rule statements that you define explicitly and rule statements that reference rule groups and managed rule groups. You can associate a web ACL with one or more AWS resources to protect. The resources can be an Amazon CloudFront distribution, an Amazon API Gateway REST API, an Application Load Balancer , an AWS AppSync GraphQL API , an Amazon Cognito user pool, or an AWS App Runner service.

CloudformationResource:

AWS::WAFv2::WebACL

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_aCL = wafv2.CfnWebACL(self, "MyCfnWebACL",
    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"]
)

Create a new AWS::WAFv2::WebACL.

Parameters:
  • scope (str) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

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

  • 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 .

  • 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.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::WAFv2::WebACL'
attr_arn

The Amazon Resource Name (ARN) of the web ACL.

CloudformationAttribute:

Arn

attr_capacity

The web ACL capacity units (WCUs) currently being used by this web ACL.

AWS WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. AWS WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.

CloudformationAttribute:

Capacity

attr_id

The ID of the web ACL.

CloudformationAttribute:

Id

attr_label_namespace

The label namespace prefix for this web ACL.

All labels added by rules in this web ACL have this prefix.

The syntax for the label namespace prefix for a web ACL is the following: awswaf:<account ID>:webacl:<web ACL name>:

When a rule with a label matches a web request, AWS WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon.

CloudformationAttribute:

LabelNamespace

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

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

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

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

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

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

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

node

The construct tree node associated with this construct.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

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

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

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

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AWSManagedRulesATPRuleSetProperty

class CfnWebACL.AWSManagedRulesATPRuleSetProperty(*, login_path, request_inspection=None, response_inspection=None)

Bases: object

Details for your use of the account takeover prevention managed rule group, AWSManagedRulesATPRuleSet .

This configuration is used in ManagedRuleGroupConfig .

Parameters:
  • login_path (str) – The path of the login endpoint for your application. For example, for the URL https://example.com/web/login , you would provide the path /web/login . The rule group inspects only HTTP POST requests to your specified login endpoint.

  • request_inspection (Union[IResolvable, RequestInspectionProperty, Dict[str, Any], None]) – The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage.

  • response_inspection (Union[IResolvable, ResponseInspectionProperty, Dict[str, Any], None]) – The criteria for inspecting responses to login requests, used by the ATP rule group to track login failure rates. .. epigraph:: Response inspection is available only in web ACLs that protect Amazon CloudFront distributions. The ATP rule group evaluates the responses that your protected resources send back to client login attempts, keeping count of successful and failed attempts for each IP address and client session. Using this information, the rule group labels and mitigates requests from client sessions and IP addresses that have had too many failed login attempts in a short amount of time.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-awsmanagedrulesatpruleset.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

a_wSManaged_rules_aTPRule_set_property = 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]
        )
    )
)

Attributes

login_path

The path of the login endpoint for your application.

For example, for the URL https://example.com/web/login , you would provide the path /web/login .

The rule group inspects only HTTP POST requests to your specified login endpoint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-awsmanagedrulesatpruleset.html#cfn-wafv2-webacl-awsmanagedrulesatpruleset-loginpath

request_inspection

The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-awsmanagedrulesatpruleset.html#cfn-wafv2-webacl-awsmanagedrulesatpruleset-requestinspection

response_inspection

The criteria for inspecting responses to login requests, used by the ATP rule group to track login failure rates.

Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.

The ATP rule group evaluates the responses that your protected resources send back to client login attempts, keeping count of successful and failed attempts for each IP address and client session. Using this information, the rule group labels and mitigates requests from client sessions and IP addresses that have had too many failed login attempts in a short amount of time.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-awsmanagedrulesatpruleset.html#cfn-wafv2-webacl-awsmanagedrulesatpruleset-responseinspection

AWSManagedRulesBotControlRuleSetProperty

class CfnWebACL.AWSManagedRulesBotControlRuleSetProperty(*, inspection_level)

Bases: object

Details for your use of the Bot Control managed rule group, used in ManagedRuleGroupConfig .

Parameters:

inspection_level (str) – The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see AWS WAF Bot Control rule group .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-awsmanagedrulesbotcontrolruleset.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

a_wSManaged_rules_bot_control_rule_set_property = wafv2.CfnWebACL.AWSManagedRulesBotControlRuleSetProperty(
    inspection_level="inspectionLevel"
)

Attributes

inspection_level

The inspection level to use for the Bot Control rule group.

The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see AWS WAF Bot Control rule group .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-awsmanagedrulesbotcontrolruleset.html#cfn-wafv2-webacl-awsmanagedrulesbotcontrolruleset-inspectionlevel

AllowActionProperty

class CfnWebACL.AllowActionProperty(*, custom_request_handling=None)

Bases: object

Specifies that AWS WAF should allow the request and optionally defines additional custom handling for the request.

This is used in the context of other settings, for example to specify values for a rule action or a web ACL default action.

Parameters:

custom_request_handling (Union[IResolvable, CustomRequestHandlingProperty, Dict[str, Any], None]) –

Defines custom handling for the web request. For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-allowaction.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

allow_action_property = wafv2.CfnWebACL.AllowActionProperty(
    custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
        insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
            name="name",
            value="value"
        )]
    )
)

Attributes

custom_request_handling

Defines custom handling for the web request.

For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-allowaction.html#cfn-wafv2-webacl-allowaction-customrequesthandling

AndStatementProperty

class CfnWebACL.AndStatementProperty(*, statements)

Bases: object

A logical rule statement used to combine other rule statements with AND logic.

You provide more than one Statement within the AndStatement .

Parameters:

statements (Union[IResolvable, Sequence[Union[IResolvable, StatementProperty, Dict[str, Any]]]]) – The statements to combine with AND logic. You can use any statements that can be nested.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-andstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# statement_property_: wafv2.CfnWebACL.StatementProperty
# uri_path: Any

and_statement_property = wafv2.CfnWebACL.AndStatementProperty(
    statements=[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"
            )]
        )
    )]
)

Attributes

statements

The statements to combine with AND logic.

You can use any statements that can be nested.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-andstatement.html#cfn-wafv2-webacl-andstatement-statements

BlockActionProperty

class CfnWebACL.BlockActionProperty(*, custom_response=None)

Bases: object

Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request.

This is used in the context of other settings, for example to specify values for a rule action or a web ACL default action.

Parameters:

custom_response (Union[IResolvable, CustomResponseProperty, Dict[str, Any], None]) –

Defines a custom response for the web request. For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-blockaction.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

block_action_property = 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"
        )]
    )
)

Attributes

custom_response

Defines a custom response for the web request.

For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-blockaction.html#cfn-wafv2-webacl-blockaction-customresponse

BodyProperty

class CfnWebACL.BodyProperty(*, oversize_handling=None)

Bases: object

Inspect the body of the web request. The body immediately follows the request headers.

This is used to indicate the web request component to inspect, in the FieldToMatch specification.

Parameters:

oversize_handling (Optional[str]) – What AWS WAF should do if the body is larger than AWS WAF can inspect. AWS WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. If the body is larger than the limit, the underlying host service only forwards the contents that are below the limit to AWS WAF for inspection. The default limit is 8 KB (8,192 kilobytes) for regional resources and 16 KB (16,384 kilobytes) for CloudFront distributions. For CloudFront distributions, you can increase the limit in the web ACL AssociationConfig , for additional processing fees. The options for oversize handling are the following: - CONTINUE - Inspect the available body contents normally, according to the rule inspection criteria. - MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request. - NO_MATCH - Treat the web request as not matching the rule statement. You can combine the MATCH or NO_MATCH settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit. Default: CONTINUE

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-body.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

body_property = wafv2.CfnWebACL.BodyProperty(
    oversize_handling="oversizeHandling"
)

Attributes

oversize_handling

What AWS WAF should do if the body is larger than AWS WAF can inspect.

AWS WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. If the body is larger than the limit, the underlying host service only forwards the contents that are below the limit to AWS WAF for inspection.

The default limit is 8 KB (8,192 kilobytes) for regional resources and 16 KB (16,384 kilobytes) for CloudFront distributions. For CloudFront distributions, you can increase the limit in the web ACL AssociationConfig , for additional processing fees.

The options for oversize handling are the following:

  • CONTINUE - Inspect the available body contents normally, according to the rule inspection criteria.

  • MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.

  • NO_MATCH - Treat the web request as not matching the rule statement.

You can combine the MATCH or NO_MATCH settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit.

Default: CONTINUE

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-body.html#cfn-wafv2-webacl-body-oversizehandling

ByteMatchStatementProperty

class CfnWebACL.ByteMatchStatementProperty(*, field_to_match, positional_constraint, text_transformations, search_string=None, search_string_base64=None)

Bases: object

A rule statement that defines a string match search for AWS WAF to apply to web requests.

The byte match statement provides the bytes to search for, the location in requests that you want AWS WAF to search, and other settings. The bytes to search for are typically a string that corresponds with ASCII characters. In the AWS WAF console and the developer guide, this is called a string match statement.

Parameters:
  • field_to_match (Union[IResolvable, FieldToMatchProperty, Dict[str, Any]]) – The part of the web request that you want AWS WAF to inspect.

  • positional_constraint (str) – The area within the portion of the web request that you want AWS WAF to search for SearchString . Valid values include the following: CONTAINS The specified part of the web request must include the value of SearchString , but the location doesn’t matter. CONTAINS_WORD The specified part of the web request must include the value of SearchString , and SearchString must contain only alphanumeric characters or underscore (A-Z, a-z, 0-9, or _). In addition, SearchString must be a word, which means that both of the following are true: - SearchString is at the beginning of the specified part of the web request or is preceded by a character other than an alphanumeric character or underscore (_). Examples include the value of a header and ;BadBot . - SearchString is at the end of the specified part of the web request or is followed by a character other than an alphanumeric character or underscore (_), for example, BadBot; and -BadBot; . EXACTLY The value of the specified part of the web request must exactly match the value of SearchString . STARTS_WITH The value of SearchString must appear at the beginning of the specified part of the web request. ENDS_WITH The value of SearchString must appear at the end of the specified part of the web request.

  • text_transformations (Union[IResolvable, Sequence[Union[IResolvable, TextTransformationProperty, Dict[str, Any]]]]) – Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

  • search_string (Optional[str]) – A string value that you want AWS WAF to search for. AWS WAF searches only in the part of web requests that you designate for inspection in FieldToMatch . The maximum length of the value is 200 bytes. For alphabetic characters A-Z and a-z, the value is case sensitive. Don’t encode this string. Provide the value that you want AWS WAF to search for. AWS CloudFormation automatically base64 encodes the value for you. For example, suppose the value of Type is HEADER and the value of Data is User-Agent . If you want to search the User-Agent header for the value BadBot , you provide the string BadBot in the value of SearchString . You must specify either SearchString or SearchStringBase64 in a ByteMatchStatement .

  • search_string_base64 (Optional[str]) – String to search for in a web request component, base64-encoded. If you don’t want to encode the string, specify the unencoded value in SearchString instead. You must specify either SearchString or SearchStringBase64 in a ByteMatchStatement .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-bytematchstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# uri_path: Any

byte_match_statement_property = 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"
)

Attributes

field_to_match

The part of the web request that you want AWS WAF to inspect.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-bytematchstatement.html#cfn-wafv2-webacl-bytematchstatement-fieldtomatch

positional_constraint

The area within the portion of the web request that you want AWS WAF to search for SearchString .

Valid values include the following:

CONTAINS

The specified part of the web request must include the value of SearchString , but the location doesn’t matter.

CONTAINS_WORD

The specified part of the web request must include the value of SearchString , and SearchString must contain only alphanumeric characters or underscore (A-Z, a-z, 0-9, or _). In addition, SearchString must be a word, which means that both of the following are true:

  • SearchString is at the beginning of the specified part of the web request or is preceded by a character other than an alphanumeric character or underscore (_). Examples include the value of a header and ;BadBot .

  • SearchString is at the end of the specified part of the web request or is followed by a character other than an alphanumeric character or underscore (_), for example, BadBot; and -BadBot; .

EXACTLY

The value of the specified part of the web request must exactly match the value of SearchString .

STARTS_WITH

The value of SearchString must appear at the beginning of the specified part of the web request.

ENDS_WITH

The value of SearchString must appear at the end of the specified part of the web request.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-bytematchstatement.html#cfn-wafv2-webacl-bytematchstatement-positionalconstraint

search_string

A string value that you want AWS WAF to search for.

AWS WAF searches only in the part of web requests that you designate for inspection in FieldToMatch . The maximum length of the value is 200 bytes. For alphabetic characters A-Z and a-z, the value is case sensitive.

Don’t encode this string. Provide the value that you want AWS WAF to search for. AWS CloudFormation automatically base64 encodes the value for you.

For example, suppose the value of Type is HEADER and the value of Data is User-Agent . If you want to search the User-Agent header for the value BadBot , you provide the string BadBot in the value of SearchString .

You must specify either SearchString or SearchStringBase64 in a ByteMatchStatement .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-bytematchstatement.html#cfn-wafv2-webacl-bytematchstatement-searchstring

search_string_base64

String to search for in a web request component, base64-encoded.

If you don’t want to encode the string, specify the unencoded value in SearchString instead.

You must specify either SearchString or SearchStringBase64 in a ByteMatchStatement .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-bytematchstatement.html#cfn-wafv2-webacl-bytematchstatement-searchstringbase64

text_transformations

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.

If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-bytematchstatement.html#cfn-wafv2-webacl-bytematchstatement-texttransformations

CaptchaActionProperty

class CfnWebACL.CaptchaActionProperty(*, custom_request_handling=None)

Bases: object

Specifies that AWS WAF should run a CAPTCHA check against the request:.

  • If the request includes a valid, unexpired CAPTCHA token, AWS WAF allows the web request inspection to proceed to the next rule, similar to a CountAction .

  • If the request doesn’t include a valid, unexpired CAPTCHA token, AWS WAF discontinues the web ACL evaluation of the request and blocks it from going to its intended destination.

AWS WAF generates a response that it sends back to the client, which includes the following:

  • The header x-amzn-waf-action with a value of captcha .

  • The HTTP status code 405 Method Not Allowed .

  • If the request contains an Accept header with a value of text/html , the response includes a CAPTCHA challenge.

You can configure the expiration time in the CaptchaConfig ImmunityTimeProperty setting at the rule and web ACL level. The rule setting overrides the web ACL setting.

This action option is available for rules. It isn’t available for web ACL default actions.

Parameters:

custom_request_handling (Union[IResolvable, CustomRequestHandlingProperty, Dict[str, Any], None]) –

Defines custom handling for the web request, used when the CAPTCHA inspection determines that the request’s token is valid and unexpired. For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaaction.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

captcha_action_property = wafv2.CfnWebACL.CaptchaActionProperty(
    custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
        insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
            name="name",
            value="value"
        )]
    )
)

Attributes

custom_request_handling

Defines custom handling for the web request, used when the CAPTCHA inspection determines that the request’s token is valid and unexpired.

For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaaction.html#cfn-wafv2-webacl-captchaaction-customrequesthandling

CaptchaConfigProperty

class CfnWebACL.CaptchaConfigProperty(*, immunity_time_property=None)

Bases: object

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 .

Parameters:

immunity_time_property (Union[IResolvable, ImmunityTimePropertyProperty, Dict[str, Any], None]) – Determines how long a CAPTCHA timestamp in the token remains valid after the client successfully solves a CAPTCHA puzzle.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-captchaconfig.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

captcha_config_property = wafv2.CfnWebACL.CaptchaConfigProperty(
    immunity_time_property=wafv2.CfnWebACL.ImmunityTimePropertyProperty(
        immunity_time=123
    )
)

Attributes

immunity_time_property

Determines how long a CAPTCHA timestamp in the token remains valid after the client successfully solves a CAPTCHA puzzle.

Link:

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

ChallengeActionProperty

class CfnWebACL.ChallengeActionProperty(*, custom_request_handling=None)

Bases: object

Specifies that AWS WAF should run a Challenge check against the request to verify that the request is coming from a legitimate client session: - If the request includes a valid, unexpired challenge token, AWS WAF applies any custom request handling and labels that you’ve configured and then allows the web request inspection to proceed to the next rule, similar to a CountAction .

  • If the request doesn’t include a valid, unexpired challenge token, AWS WAF discontinues the web ACL evaluation of the request and blocks it from going to its intended destination.

AWS WAF then generates a challenge response that it sends back to the client, which includes the following:

  • The header x-amzn-waf-action with a value of challenge .

  • The HTTP status code 202 Request Accepted .

  • If the request contains an Accept header with a value of text/html , the response includes a JavaScript page interstitial with a challenge script.

Challenges run silent browser interrogations in the background, and don’t generally affect the end user experience.

A challenge enforces token acquisition using an interstitial JavaScript challenge that inspects the client session for legitimate behavior. The challenge blocks bots or at least increases the cost of operating sophisticated bots.

After the client session successfully responds to the challenge, it receives a new token from AWS WAF , which the challenge script uses to resubmit the original request.

You can configure the expiration time in the ChallengeConfig ImmunityTimeProperty setting at the rule and web ACL level. The rule setting overrides the web ACL setting.

This action option is available for rules. It isn’t available for web ACL default actions.

Parameters:

custom_request_handling (Union[IResolvable, CustomRequestHandlingProperty, Dict[str, Any], None]) –

Defines custom handling for the web request, used when the challenge inspection determines that the request’s token is valid and unexpired. For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-challengeaction.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

challenge_action_property = wafv2.CfnWebACL.ChallengeActionProperty(
    custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
        insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
            name="name",
            value="value"
        )]
    )
)

Attributes

custom_request_handling

Defines custom handling for the web request, used when the challenge inspection determines that the request’s token is valid and unexpired.

For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-challengeaction.html#cfn-wafv2-webacl-challengeaction-customrequesthandling

ChallengeConfigProperty

class CfnWebACL.ChallengeConfigProperty(*, immunity_time_property=None)

Bases: object

Specifies how AWS WAF should handle Challenge evaluations.

This is available at the web ACL level and in each rule.

Parameters:

immunity_time_property (Union[IResolvable, ImmunityTimePropertyProperty, Dict[str, Any], None]) – Determines how long a challenge timestamp in the token remains valid after the client successfully responds to a challenge.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-challengeconfig.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

challenge_config_property = wafv2.CfnWebACL.ChallengeConfigProperty(
    immunity_time_property=wafv2.CfnWebACL.ImmunityTimePropertyProperty(
        immunity_time=123
    )
)

Attributes

immunity_time_property

Determines how long a challenge timestamp in the token remains valid after the client successfully responds to a challenge.

Link:

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

CookieMatchPatternProperty

class CfnWebACL.CookieMatchPatternProperty(*, all=None, excluded_cookies=None, included_cookies=None)

Bases: object

The filter to use to identify the subset of cookies to inspect in a web request.

You must specify exactly one setting: either All , IncludedCookies , or ExcludedCookies .

Example JSON: "MatchPattern": { "IncludedCookies": {"KeyToInclude1", "KeyToInclude2", "KeyToInclude3"} }

Parameters:
  • all (Optional[Any]) – Inspect all cookies.

  • excluded_cookies (Optional[Sequence[str]]) – Inspect only the cookies whose keys don’t match any of the strings specified here.

  • included_cookies (Optional[Sequence[str]]) – Inspect only the cookies that have a key that matches one of the strings specified here.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-cookiematchpattern.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

cookie_match_pattern_property = wafv2.CfnWebACL.CookieMatchPatternProperty(
    all=all,
    excluded_cookies=["excludedCookies"],
    included_cookies=["includedCookies"]
)

Attributes

all

Inspect all cookies.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-cookiematchpattern.html#cfn-wafv2-webacl-cookiematchpattern-all

excluded_cookies

Inspect only the cookies whose keys don’t match any of the strings specified here.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-cookiematchpattern.html#cfn-wafv2-webacl-cookiematchpattern-excludedcookies

included_cookies

Inspect only the cookies that have a key that matches one of the strings specified here.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-cookiematchpattern.html#cfn-wafv2-webacl-cookiematchpattern-includedcookies

CookiesProperty

class CfnWebACL.CookiesProperty(*, match_pattern, match_scope, oversize_handling)

Bases: object

Inspect the cookies in the web request.

You can specify the parts of the cookies to inspect and you can narrow the set of cookies to inspect by including or excluding specific keys.

This is used to indicate the web request component to inspect, in the FieldToMatch specification.

Example JSON: "Cookies": { "MatchPattern": { "All": {} }, "MatchScope": "KEY", "OversizeHandling": "MATCH" }

Parameters:
  • match_pattern (Union[IResolvable, CookieMatchPatternProperty, Dict[str, Any]]) – The filter to use to identify the subset of cookies to inspect in a web request. You must specify exactly one setting: either All , IncludedCookies , or ExcludedCookies . Example JSON: "MatchPattern": { "IncludedCookies": {"KeyToInclude1", "KeyToInclude2", "KeyToInclude3"} }

  • match_scope (str) – The parts of the cookies to inspect with the rule inspection criteria. If you specify All , AWS WAF inspects both keys and values.

  • oversize_handling (str) – What AWS WAF should do if the cookies of the request are more numerous or larger than AWS WAF can inspect. AWS WAF does not support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or 200 total cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to AWS WAF . The options for oversize handling are the following: - CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. - MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request. - NO_MATCH - Treat the web request as not matching the rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-cookies.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

cookies_property = wafv2.CfnWebACL.CookiesProperty(
    match_pattern=wafv2.CfnWebACL.CookieMatchPatternProperty(
        all=all,
        excluded_cookies=["excludedCookies"],
        included_cookies=["includedCookies"]
    ),
    match_scope="matchScope",
    oversize_handling="oversizeHandling"
)

Attributes

match_pattern

The filter to use to identify the subset of cookies to inspect in a web request.

You must specify exactly one setting: either All , IncludedCookies , or ExcludedCookies .

Example JSON: "MatchPattern": { "IncludedCookies": {"KeyToInclude1", "KeyToInclude2", "KeyToInclude3"} }

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-cookies.html#cfn-wafv2-webacl-cookies-matchpattern

match_scope

The parts of the cookies to inspect with the rule inspection criteria.

If you specify All , AWS WAF inspects both keys and values.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-cookies.html#cfn-wafv2-webacl-cookies-matchscope

oversize_handling

What AWS WAF should do if the cookies of the request are more numerous or larger than AWS WAF can inspect.

AWS WAF does not support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or 200 total cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to AWS WAF .

The options for oversize handling are the following:

  • CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria.

  • MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.

  • NO_MATCH - Treat the web request as not matching the rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-cookies.html#cfn-wafv2-webacl-cookies-oversizehandling

CountActionProperty

class CfnWebACL.CountActionProperty(*, custom_request_handling=None)

Bases: object

Specifies that AWS WAF should count the request. Optionally defines additional custom handling for the request.

This is used in the context of other settings, for example to specify values for a rule action or a web ACL default action.

Parameters:

custom_request_handling (Union[IResolvable, CustomRequestHandlingProperty, Dict[str, Any], None]) –

Defines custom handling for the web request. For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-countaction.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

count_action_property = wafv2.CfnWebACL.CountActionProperty(
    custom_request_handling=wafv2.CfnWebACL.CustomRequestHandlingProperty(
        insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
            name="name",
            value="value"
        )]
    )
)

Attributes

custom_request_handling

Defines custom handling for the web request.

For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-countaction.html#cfn-wafv2-webacl-countaction-customrequesthandling

CustomHTTPHeaderProperty

class CfnWebACL.CustomHTTPHeaderProperty(*, name, value)

Bases: object

A custom header for custom request and response handling.

This is used in CustomResponse and CustomRequestHandling .

Parameters:
  • name (str) – The name of the custom header. For custom request header insertion, when AWS WAF inserts the header into the request, it prefixes this name x-amzn-waf- , to avoid confusion with the headers that are already in the request. For example, for the header name sample , AWS WAF inserts the header x-amzn-waf-sample .

  • value (str) – The value of the custom header.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-customhttpheader.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

custom_hTTPHeader_property = wafv2.CfnWebACL.CustomHTTPHeaderProperty(
    name="name",
    value="value"
)

Attributes

name

The name of the custom header.

For custom request header insertion, when AWS WAF inserts the header into the request, it prefixes this name x-amzn-waf- , to avoid confusion with the headers that are already in the request. For example, for the header name sample , AWS WAF inserts the header x-amzn-waf-sample .

Link:

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

value

The value of the custom header.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-customhttpheader.html#cfn-wafv2-webacl-customhttpheader-value

CustomRequestHandlingProperty

class CfnWebACL.CustomRequestHandlingProperty(*, insert_headers)

Bases: object

Custom request handling behavior that inserts custom headers into a web request.

You can add custom request handling for AWS WAF to use when the rule action doesn’t block the request. For example, CaptchaAction for requests with valid t okens, and AllowAction .

For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Parameters:

insert_headers (Union[IResolvable, Sequence[Union[IResolvable, CustomHTTPHeaderProperty, Dict[str, Any]]]]) –

The HTTP headers to insert into the request. Duplicate header names are not allowed. 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-properties-wafv2-webacl-customrequesthandling.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

custom_request_handling_property = wafv2.CfnWebACL.CustomRequestHandlingProperty(
    insert_headers=[wafv2.CfnWebACL.CustomHTTPHeaderProperty(
        name="name",
        value="value"
    )]
)

Attributes

insert_headers

The HTTP headers to insert into the request. Duplicate header names are not allowed.

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-properties-wafv2-webacl-customrequesthandling.html#cfn-wafv2-webacl-customrequesthandling-insertheaders

CustomResponseBodyProperty

class CfnWebACL.CustomResponseBodyProperty(*, content, content_type)

Bases: object

The response body to use in a custom response to a web request.

This is referenced by key from CustomResponse CustomResponseBodyKey .

Parameters:
  • content (str) –

    The payload of the custom response. You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType setting. 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 .

  • content_type (str) – The type of content in the payload that you are defining in the Content string.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-customresponsebody.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

custom_response_body_property = wafv2.CfnWebACL.CustomResponseBodyProperty(
    content="content",
    content_type="contentType"
)

Attributes

content

The payload of the custom response.

You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType setting.

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-properties-wafv2-webacl-customresponsebody.html#cfn-wafv2-webacl-customresponsebody-content

content_type

The type of content in the payload that you are defining in the Content string.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-customresponsebody.html#cfn-wafv2-webacl-customresponsebody-contenttype

CustomResponseProperty

class CfnWebACL.CustomResponseProperty(*, response_code, custom_response_body_key=None, response_headers=None)

Bases: object

A custom response to send to the client.

You can define a custom response for rule actions and default web ACL actions that are set to the block action.

For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .

Parameters:
  • response_code (Union[int, float]) – The HTTP status code to return to the client. For a list of status codes that you can use in your custom responses, see Supported status codes for custom response in the AWS WAF Developer Guide .

  • custom_response_body_key (Optional[str]) – References the response body that you want AWS WAF to return to the web request client. You can define a custom response for a rule action or a default web ACL action that is set to block. To do this, you first define the response body key and value in the CustomResponseBodies setting for the WebACL or RuleGroup where you want to use it. Then, in the rule action or web ACL default action BlockAction setting, you reference the response body using this key.

  • response_headers (Union[IResolvable, Sequence[Union[IResolvable, CustomHTTPHeaderProperty, Dict[str, Any]]], None]) –

    The HTTP headers to use in the response. Duplicate header names are not allowed. 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-properties-wafv2-webacl-customresponse.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

custom_response_property = 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"
    )]
)

Attributes

custom_response_body_key

References the response body that you want AWS WAF to return to the web request client.

You can define a custom response for a rule action or a default web ACL action that is set to block. To do this, you first define the response body key and value in the CustomResponseBodies setting for the WebACL or RuleGroup where you want to use it. Then, in the rule action or web ACL default action BlockAction setting, you reference the response body using this key.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-customresponse.html#cfn-wafv2-webacl-customresponse-customresponsebodykey

response_code

The HTTP status code to return to the client.

For a list of status codes that you can use in your custom responses, see Supported status codes for custom response in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-customresponse.html#cfn-wafv2-webacl-customresponse-responsecode

response_headers

The HTTP headers to use in the response. Duplicate header names are not allowed.

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-properties-wafv2-webacl-customresponse.html#cfn-wafv2-webacl-customresponse-responseheaders

DefaultActionProperty

class CfnWebACL.DefaultActionProperty(*, allow=None, block=None)

Bases: object

In a WebACL , this is the action that you want AWS WAF to perform when a web request doesn’t match any of the rules in the WebACL .

The default action must be a terminating action.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-defaultaction.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

default_action_property = 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"
            )]
        )
    )
)

Attributes

allow

Specifies that AWS WAF should allow requests by default.

Link:

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

block

Specifies that AWS WAF should block requests by default.

Link:

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

ExcludedRuleProperty

class CfnWebACL.ExcludedRuleProperty(*, name)

Bases: object

Specifies a single rule in a rule group whose action you want to override to Count .

Instead of this option, use RuleActionOverrides . It accepts any valid action setting, including Count .

Parameters:

name (str) – The name of the rule whose action you want to override to Count .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-excludedrule.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

excluded_rule_property = wafv2.CfnWebACL.ExcludedRuleProperty(
    name="name"
)

Attributes

name

The name of the rule whose action you want to override to Count .

Link:

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

FieldIdentifierProperty

class CfnWebACL.FieldIdentifierProperty(*, identifier)

Bases: object

The identifier of the username or password field, used in the ManagedRuleGroupConfig settings.

Parameters:

identifier (str) – The name of the username or password field, used in the ManagedRuleGroupConfig settings. When the PayloadType is JSON , the identifier must be in JSON pointer syntax. For example /form/username . For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer . When the PayloadType is FORM_ENCODED , use the HTML form names. For example, username .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldidentifier.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

field_identifier_property = wafv2.CfnWebACL.FieldIdentifierProperty(
    identifier="identifier"
)

Attributes

identifier

The name of the username or password field, used in the ManagedRuleGroupConfig settings.

When the PayloadType is JSON , the identifier must be in JSON pointer syntax. For example /form/username . For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer .

When the PayloadType is FORM_ENCODED , use the HTML form names. For example, username .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldidentifier.html#cfn-wafv2-webacl-fieldidentifier-identifier

FieldToMatchProperty

class CfnWebACL.FieldToMatchProperty(*, all_query_arguments=None, body=None, cookies=None, headers=None, json_body=None, method=None, query_string=None, single_header=None, single_query_argument=None, uri_path=None)

Bases: object

The part of the web request that you want AWS WAF to inspect.

Include the single FieldToMatch type that you want to inspect, with additional specifications as needed, according to the type. You specify a single request component in FieldToMatch for each rule statement that requires it. To inspect more than one component of the web request, create a separate rule statement for each component.

Example JSON for a QueryString field to match:

"FieldToMatch": { "QueryString": {} }

Example JSON for a Method field to match specification:

"FieldToMatch": { "Method": { "Name": "DELETE" } }

Parameters:
  • all_query_arguments (Optional[Any]) – Inspect all query arguments.

  • body (Union[IResolvable, BodyProperty, Dict[str, Any], None]) – Inspect the request body as plain text. The request body immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form. A limited amount of the request body is forwarded to AWS WAF for inspection by the underlying host service. For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL’s AssociationConfig , for additional processing fees. For information about how to handle oversized request bodies, see the Body object configuration.

  • cookies (Union[IResolvable, CookiesProperty, Dict[str, Any], None]) – Inspect the request cookies. You must configure scope and pattern matching filters in the Cookies object, to define the set of cookies and the parts of the cookies that AWS WAF inspects. Only the first 8 KB (8192 bytes) of a request’s cookies and only the first 200 cookies are forwarded to AWS WAF for inspection by the underlying host service. You must configure how to handle any oversize cookie content in the Cookies object. AWS WAF applies the pattern matching filters to the cookies that it receives from the underlying host service.

  • headers (Union[IResolvable, HeadersProperty, Dict[str, Any], None]) – Inspect the request headers. You must configure scope and pattern matching filters in the Headers object, to define the set of headers to and the parts of the headers that AWS WAF inspects. Only the first 8 KB (8192 bytes) of a request’s headers and only the first 200 headers are forwarded to AWS WAF for inspection by the underlying host service. You must configure how to handle any oversize header content in the Headers object. AWS WAF applies the pattern matching filters to the headers that it receives from the underlying host service.

  • json_body (Union[IResolvable, JsonBodyProperty, Dict[str, Any], None]) – Inspect the request body as JSON. The request body immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form. A limited amount of the request body is forwarded to AWS WAF for inspection by the underlying host service. For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL’s AssociationConfig , for additional processing fees. For information about how to handle oversized request bodies, see the JsonBody object configuration.

  • method (Optional[Any]) – Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to perform.

  • query_string (Optional[Any]) – Inspect the query string. This is the part of a URL that appears after a ? character, if any.

  • single_header (Optional[Any]) – Inspect a single header. Provide the name of the header to inspect, for example, User-Agent or Referer . This setting isn’t case sensitive. Example JSON: "SingleHeader": { "Name": "haystack" } Alternately, you can filter and inspect all headers with the Headers FieldToMatch setting.

  • single_query_argument (Optional[Any]) – Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or SalesRegion . The name can be up to 30 characters long and isn’t case sensitive. Example JSON: "SingleQueryArgument": { "Name": "myArgument" }

  • uri_path (Optional[Any]) – Inspect the request URI path. This is the part of the web request that identifies a resource, for example, /images/daily-ad.jpg .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# uri_path: Any

field_to_match_property = 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
)

Attributes

all_query_arguments

Inspect all query arguments.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-allqueryarguments

body

Inspect the request body as plain text.

The request body immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form.

A limited amount of the request body is forwarded to AWS WAF for inspection by the underlying host service. For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL’s AssociationConfig , for additional processing fees.

For information about how to handle oversized request bodies, see the Body object configuration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-body

cookies

Inspect the request cookies.

You must configure scope and pattern matching filters in the Cookies object, to define the set of cookies and the parts of the cookies that AWS WAF inspects.

Only the first 8 KB (8192 bytes) of a request’s cookies and only the first 200 cookies are forwarded to AWS WAF for inspection by the underlying host service. You must configure how to handle any oversize cookie content in the Cookies object. AWS WAF applies the pattern matching filters to the cookies that it receives from the underlying host service.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-cookies

headers

Inspect the request headers.

You must configure scope and pattern matching filters in the Headers object, to define the set of headers to and the parts of the headers that AWS WAF inspects.

Only the first 8 KB (8192 bytes) of a request’s headers and only the first 200 headers are forwarded to AWS WAF for inspection by the underlying host service. You must configure how to handle any oversize header content in the Headers object. AWS WAF applies the pattern matching filters to the headers that it receives from the underlying host service.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-headers

json_body

Inspect the request body as JSON.

The request body immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form.

A limited amount of the request body is forwarded to AWS WAF for inspection by the underlying host service. For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL’s AssociationConfig , for additional processing fees.

For information about how to handle oversized request bodies, see the JsonBody object configuration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-jsonbody

method

Inspect the HTTP method.

The method indicates the type of operation that the request is asking the origin to perform.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-method

query_string

Inspect the query string.

This is the part of a URL that appears after a ? character, if any.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-querystring

single_header

Inspect a single header.

Provide the name of the header to inspect, for example, User-Agent or Referer . This setting isn’t case sensitive.

Example JSON: "SingleHeader": { "Name": "haystack" }

Alternately, you can filter and inspect all headers with the Headers FieldToMatch setting.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-singleheader

single_query_argument

Inspect a single query argument.

Provide the name of the query argument to inspect, such as UserName or SalesRegion . The name can be up to 30 characters long and isn’t case sensitive.

Example JSON: "SingleQueryArgument": { "Name": "myArgument" }

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-singlequeryargument

uri_path

Inspect the request URI path.

This is the part of the web request that identifies a resource, for example, /images/daily-ad.jpg .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-uripath

ForwardedIPConfigurationProperty

class CfnWebACL.ForwardedIPConfigurationProperty(*, fallback_behavior, header_name)

Bases: object

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that’s reported by the web request origin.

Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name. .. epigraph:

If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.

This configuration is used for GeoMatchStatement and RateBasedStatement . For IPSetReferenceStatement , use IPSetForwardedIPConfig instead.

AWS WAF only evaluates the first IP address found in the specified HTTP header.

Parameters:
  • fallback_behavior (str) – The match status to assign to the web request if the request doesn’t have a valid IP address in the specified position. .. epigraph:: If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all. You can specify the following fallback behaviors: - MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request. - NO_MATCH - Treat the web request as not matching the rule statement.

  • header_name (str) – The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For . .. epigraph:: If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-forwardedipconfiguration.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

forwarded_iPConfiguration_property = wafv2.CfnWebACL.ForwardedIPConfigurationProperty(
    fallback_behavior="fallbackBehavior",
    header_name="headerName"
)

Attributes

fallback_behavior

The match status to assign to the web request if the request doesn’t have a valid IP address in the specified position.

If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all.

You can specify the following fallback behaviors:

  • MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.

  • NO_MATCH - Treat the web request as not matching the rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-forwardedipconfiguration.html#cfn-wafv2-webacl-forwardedipconfiguration-fallbackbehavior

header_name

The name of the HTTP header to use for the IP address.

For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For . .. epigraph:

If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-forwardedipconfiguration.html#cfn-wafv2-webacl-forwardedipconfiguration-headername

GeoMatchStatementProperty

class CfnWebACL.GeoMatchStatementProperty(*, country_codes=None, forwarded_ip_config=None)

Bases: object

A rule statement that labels web requests by country and region and that matches against web requests based on country code.

A geo match rule labels every request that it inspects regardless of whether it finds a match.

  • To manage requests only by country, you can use this statement by itself and specify the countries that you want to match against in the CountryCodes array.

  • Otherwise, configure your geo match rule with Count action so that it only labels requests. Then, add one or more label match rules to run after the geo match rule and configure them to match against the geographic labels and handle the requests as needed.

AWS WAF labels requests using the alpha-2 country and region codes from the International Organization for Standardization (ISO) 3166 standard. AWS WAF determines the codes using either the IP address in the web request origin or, if you specify it, the address in the geo match ForwardedIPConfig .

If you use the web request origin, the label formats are awswaf:clientip:geo:region:<ISO country code>-<ISO region code> and awswaf:clientip:geo:country:<ISO country code> .

If you use a forwarded IP address, the label formats are awswaf:forwardedip:geo:region:<ISO country code>-<ISO region code> and awswaf:forwardedip:geo:country:<ISO country code> .

For additional details, see Geographic match rule statement in the AWS WAF Developer Guide .

Parameters:
  • country_codes (Optional[Sequence[str]]) – An array of two-character country codes that you want to match against, for example, [ "US", "CN" ] , from the alpha-2 country ISO codes of the ISO 3166 international standard. When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that’s unlikely to be a source of traffic to your site.

  • forwarded_ip_config (Union[IResolvable, ForwardedIPConfigurationProperty, Dict[str, Any], None]) – The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that’s reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name. .. epigraph:: If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-geomatchstatement.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

geo_match_statement_property = wafv2.CfnWebACL.GeoMatchStatementProperty(
    country_codes=["countryCodes"],
    forwarded_ip_config=wafv2.CfnWebACL.ForwardedIPConfigurationProperty(
        fallback_behavior="fallbackBehavior",
        header_name="headerName"
    )
)

Attributes

country_codes

An array of two-character country codes that you want to match against, for example, [ "US", "CN" ] , from the alpha-2 country ISO codes of the ISO 3166 international standard.

When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that’s unlikely to be a source of traffic to your site.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-geomatchstatement.html#cfn-wafv2-webacl-geomatchstatement-countrycodes

forwarded_ip_config

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that’s reported by the web request origin.

Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name. .. epigraph:

If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-geomatchstatement.html#cfn-wafv2-webacl-geomatchstatement-forwardedipconfig

HeaderMatchPatternProperty

class CfnWebACL.HeaderMatchPatternProperty(*, all=None, excluded_headers=None, included_headers=None)

Bases: object

The filter to use to identify the subset of headers to inspect in a web request.

You must specify exactly one setting: either All , IncludedHeaders , or ExcludedHeaders .

Example JSON: "MatchPattern": { "ExcludedHeaders": {"KeyToExclude1", "KeyToExclude2"} }

Parameters:
  • all (Optional[Any]) – Inspect all headers.

  • excluded_headers (Optional[Sequence[str]]) – Inspect only the headers whose keys don’t match any of the strings specified here.

  • included_headers (Optional[Sequence[str]]) – Inspect only the headers that have a key that matches one of the strings specified here.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-headermatchpattern.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

header_match_pattern_property = wafv2.CfnWebACL.HeaderMatchPatternProperty(
    all=all,
    excluded_headers=["excludedHeaders"],
    included_headers=["includedHeaders"]
)

Attributes

all

Inspect all headers.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-headermatchpattern.html#cfn-wafv2-webacl-headermatchpattern-all

excluded_headers

Inspect only the headers whose keys don’t match any of the strings specified here.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-headermatchpattern.html#cfn-wafv2-webacl-headermatchpattern-excludedheaders

included_headers

Inspect only the headers that have a key that matches one of the strings specified here.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-headermatchpattern.html#cfn-wafv2-webacl-headermatchpattern-includedheaders

HeadersProperty

class CfnWebACL.HeadersProperty(*, match_pattern, match_scope, oversize_handling)

Bases: object

Inspect all headers in the web request.

You can specify the parts of the headers to inspect and you can narrow the set of headers to inspect by including or excluding specific keys.

This is used to indicate the web request component to inspect, in the FieldToMatch specification.

If you want to inspect just the value of a single header, use the SingleHeader FieldToMatch setting instead.

Example JSON: "Headers": { "MatchPattern": { "All": {} }, "MatchScope": "KEY", "OversizeHandling": "MATCH" }

Parameters:
  • match_pattern (Union[IResolvable, HeaderMatchPatternProperty, Dict[str, Any]]) – The filter to use to identify the subset of headers to inspect in a web request. You must specify exactly one setting: either All , IncludedHeaders , or ExcludedHeaders . Example JSON: "MatchPattern": { "ExcludedHeaders": {"KeyToExclude1", "KeyToExclude2"} }

  • match_scope (str) – The parts of the headers to match with the rule inspection criteria. If you specify All , AWS WAF inspects both keys and values.

  • oversize_handling (str) – What AWS WAF should do if the headers of the request are more numerous or larger than AWS WAF can inspect. AWS WAF does not support inspecting the entire contents of request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The underlying host service forwards a maximum of 200 headers and at most 8 KB of header contents to AWS WAF . The options for oversize handling are the following: - CONTINUE - Inspect the available headers normally, according to the rule inspection criteria. - MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request. - NO_MATCH - Treat the web request as not matching the rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-headers.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

headers_property = wafv2.CfnWebACL.HeadersProperty(
    match_pattern=wafv2.CfnWebACL.HeaderMatchPatternProperty(
        all=all,
        excluded_headers=["excludedHeaders"],
        included_headers=["includedHeaders"]
    ),
    match_scope="matchScope",
    oversize_handling="oversizeHandling"
)

Attributes

match_pattern

The filter to use to identify the subset of headers to inspect in a web request.

You must specify exactly one setting: either All , IncludedHeaders , or ExcludedHeaders .

Example JSON: "MatchPattern": { "ExcludedHeaders": {"KeyToExclude1", "KeyToExclude2"} }

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-headers.html#cfn-wafv2-webacl-headers-matchpattern

match_scope

The parts of the headers to match with the rule inspection criteria.

If you specify All , AWS WAF inspects both keys and values.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-headers.html#cfn-wafv2-webacl-headers-matchscope

oversize_handling

What AWS WAF should do if the headers of the request are more numerous or larger than AWS WAF can inspect.

AWS WAF does not support inspecting the entire contents of request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The underlying host service forwards a maximum of 200 headers and at most 8 KB of header contents to AWS WAF .

The options for oversize handling are the following:

  • CONTINUE - Inspect the available headers normally, according to the rule inspection criteria.

  • MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.

  • NO_MATCH - Treat the web request as not matching the rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-headers.html#cfn-wafv2-webacl-headers-oversizehandling

IPSetForwardedIPConfigurationProperty

class CfnWebACL.IPSetForwardedIPConfigurationProperty(*, fallback_behavior, header_name, position)

Bases: object

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that’s reported by the web request origin.

Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name. .. epigraph:

If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.

This configuration is used only for IPSetReferenceStatement . For GeoMatchStatement and RateBasedStatement , use ForwardedIPConfig instead.

Parameters:
  • fallback_behavior (str) – The match status to assign to the web request if the request doesn’t have a valid IP address in the specified position. .. epigraph:: If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all. You can specify the following fallback behaviors: - MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request. - NO_MATCH - Treat the web request as not matching the rule statement.

  • header_name (str) – The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For . .. epigraph:: If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all.

  • position (str) – The position in the header to search for the IP address. The header can contain IP addresses of the original client and also of proxies. For example, the header value could be 10.1.1.1, 127.0.0.0, 10.10.10.10 where the first IP address identifies the original client and the rest identify proxies that the request went through. The options for this setting are the following: - FIRST - Inspect the first IP address in the list of IP addresses in the header. This is usually the client’s original IP. - LAST - Inspect the last IP address in the list of IP addresses in the header. - ANY - Inspect all IP addresses in the header for a match. If the header contains more than 10 IP addresses, AWS WAF inspects the last 10.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ipsetforwardedipconfiguration.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

i_pSet_forwarded_iPConfiguration_property = {
    "fallback_behavior": "fallbackBehavior",
    "header_name": "headerName",
    "position": "position"
}

Attributes

fallback_behavior

The match status to assign to the web request if the request doesn’t have a valid IP address in the specified position.

If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all.

You can specify the following fallback behaviors:

  • MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.

  • NO_MATCH - Treat the web request as not matching the rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ipsetforwardedipconfiguration.html#cfn-wafv2-webacl-ipsetforwardedipconfiguration-fallbackbehavior

header_name

The name of the HTTP header to use for the IP address.

For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For . .. epigraph:

If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ipsetforwardedipconfiguration.html#cfn-wafv2-webacl-ipsetforwardedipconfiguration-headername

position

The position in the header to search for the IP address.

The header can contain IP addresses of the original client and also of proxies. For example, the header value could be 10.1.1.1, 127.0.0.0, 10.10.10.10 where the first IP address identifies the original client and the rest identify proxies that the request went through.

The options for this setting are the following:

  • FIRST - Inspect the first IP address in the list of IP addresses in the header. This is usually the client’s original IP.

  • LAST - Inspect the last IP address in the list of IP addresses in the header.

  • ANY - Inspect all IP addresses in the header for a match. If the header contains more than 10 IP addresses, AWS WAF inspects the last 10.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ipsetforwardedipconfiguration.html#cfn-wafv2-webacl-ipsetforwardedipconfiguration-position

IPSetReferenceStatementProperty

class CfnWebACL.IPSetReferenceStatementProperty(*, arn, ip_set_forwarded_ip_config=None)

Bases: object

A rule statement used to detect web requests coming from particular IP addresses or address ranges.

To use this, create an IPSet that specifies the addresses you want to detect, then use the ARN of that set in this statement.

Each IP set rule statement references an IP set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, AWS WAF automatically updates all rules that reference it.

Parameters:
  • arn (str) – The Amazon Resource Name (ARN) of the IPSet that this statement references.

  • ip_set_forwarded_ip_config (Union[IResolvable, IPSetForwardedIPConfigurationProperty, Dict[str, Any], None]) – The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that’s reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name. .. epigraph:: If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ipsetreferencestatement.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

i_pSet_reference_statement_property = {
    "arn": "arn",

    # the properties below are optional
    "ip_set_forwarded_ip_config": {
        "fallback_behavior": "fallbackBehavior",
        "header_name": "headerName",
        "position": "position"
    }
}

Attributes

arn

The Amazon Resource Name (ARN) of the IPSet that this statement references.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ipsetreferencestatement.html#cfn-wafv2-webacl-ipsetreferencestatement-arn

ip_set_forwarded_ip_config

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that’s reported by the web request origin.

Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name. .. epigraph:

If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ipsetreferencestatement.html#cfn-wafv2-webacl-ipsetreferencestatement-ipsetforwardedipconfig

ImmunityTimePropertyProperty

class CfnWebACL.ImmunityTimePropertyProperty(*, immunity_time)

Bases: object

Used for CAPTCHA and challenge token settings.

Determines how long a CAPTCHA or challenge timestamp remains valid after AWS WAF updates it for a successful CAPTCHA or challenge response.

Parameters:

immunity_time (Union[int, float]) – The amount of time, in seconds, that a CAPTCHA or challenge timestamp is considered valid by AWS WAF . The default setting is 300. For the Challenge action, the minimum setting is 300.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-immunitytimeproperty.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

immunity_time_property_property = wafv2.CfnWebACL.ImmunityTimePropertyProperty(
    immunity_time=123
)

Attributes

immunity_time

The amount of time, in seconds, that a CAPTCHA or challenge timestamp is considered valid by AWS WAF .

The default setting is 300.

For the Challenge action, the minimum setting is 300.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-immunitytimeproperty.html#cfn-wafv2-webacl-immunitytimeproperty-immunitytime

JsonBodyProperty

class CfnWebACL.JsonBodyProperty(*, match_pattern, match_scope, invalid_fallback_behavior=None, oversize_handling=None)

Bases: object

Inspect the body of the web request as JSON. The body immediately follows the request headers.

This is used to indicate the web request component to inspect, in the FieldToMatch specification.

Use the specifications in this object to indicate which parts of the JSON body to inspect using the rule’s inspection criteria. AWS WAF inspects only the parts of the JSON that result from the matches that you indicate.

Example JSON: "JsonBody": { "MatchPattern": { "All": {} }, "MatchScope": "ALL" }

Parameters:
  • match_pattern (Union[IResolvable, JsonMatchPatternProperty, Dict[str, Any]]) – The patterns to look for in the JSON body. AWS WAF inspects the results of these pattern matches against the rule inspection criteria.

  • match_scope (str) – The parts of the JSON to match against using the MatchPattern . If you specify All , AWS WAF matches against keys and values.

  • invalid_fallback_behavior (Optional[str]) – What AWS WAF should do if it fails to completely parse the JSON body. The options are the following:. - EVALUATE_AS_STRING - Inspect the body as plain text. AWS WAF applies the text transformations and inspection criteria that you defined for the JSON inspection to the body text string. - MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request. - NO_MATCH - Treat the web request as not matching the rule statement. If you don’t provide this setting, AWS WAF parses and evaluates the content only up to the first parsing failure that it encounters. AWS WAF does its best to parse the entire JSON body, but might be forced to stop for reasons such as invalid characters, duplicate keys, truncation, and any content whose root node isn’t an object or an array. AWS WAF parses the JSON in the following examples as two valid key, value pairs: - Missing comma: {"key1":"value1""key2":"value2"} - Missing colon: {"key1":"value1","key2""value2"} - Extra colons: {"key1"::"value1","key2""value2"}

  • oversize_handling (Optional[str]) – What AWS WAF should do if the body is larger than AWS WAF can inspect. AWS WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. If the body is larger than the limit, the underlying host service only forwards the contents that are below the limit to AWS WAF for inspection. The default limit is 8 KB (8,192 kilobytes) for regional resources and 16 KB (16,384 kilobytes) for CloudFront distributions. For CloudFront distributions, you can increase the limit in the web ACL AssociationConfig , for additional processing fees. The options for oversize handling are the following: - CONTINUE - Inspect the available body contents normally, according to the rule inspection criteria. - MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request. - NO_MATCH - Treat the web request as not matching the rule statement. You can combine the MATCH or NO_MATCH settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit. Default: CONTINUE

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonbody.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

json_body_property = 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"
)

Attributes

invalid_fallback_behavior

.

  • EVALUATE_AS_STRING - Inspect the body as plain text. AWS WAF applies the text transformations and inspection criteria that you defined for the JSON inspection to the body text string.

  • MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.

  • NO_MATCH - Treat the web request as not matching the rule statement.

If you don’t provide this setting, AWS WAF parses and evaluates the content only up to the first parsing failure that it encounters.

AWS WAF does its best to parse the entire JSON body, but might be forced to stop for reasons such as invalid characters, duplicate keys, truncation, and any content whose root node isn’t an object or an array.

AWS WAF parses the JSON in the following examples as two valid key, value pairs:

  • Missing comma: {"key1":"value1""key2":"value2"}

  • Missing colon: {"key1":"value1","key2""value2"}

  • Extra colons: {"key1"::"value1","key2""value2"}

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonbody.html#cfn-wafv2-webacl-jsonbody-invalidfallbackbehavior

Type:

What AWS WAF should do if it fails to completely parse the JSON body. The options are the following

match_pattern

The patterns to look for in the JSON body.

AWS WAF inspects the results of these pattern matches against the rule inspection criteria.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonbody.html#cfn-wafv2-webacl-jsonbody-matchpattern

match_scope

The parts of the JSON to match against using the MatchPattern .

If you specify All , AWS WAF matches against keys and values.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonbody.html#cfn-wafv2-webacl-jsonbody-matchscope

oversize_handling

What AWS WAF should do if the body is larger than AWS WAF can inspect.

AWS WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. If the body is larger than the limit, the underlying host service only forwards the contents that are below the limit to AWS WAF for inspection.

The default limit is 8 KB (8,192 kilobytes) for regional resources and 16 KB (16,384 kilobytes) for CloudFront distributions. For CloudFront distributions, you can increase the limit in the web ACL AssociationConfig , for additional processing fees.

The options for oversize handling are the following:

  • CONTINUE - Inspect the available body contents normally, according to the rule inspection criteria.

  • MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.

  • NO_MATCH - Treat the web request as not matching the rule statement.

You can combine the MATCH or NO_MATCH settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit.

Default: CONTINUE

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonbody.html#cfn-wafv2-webacl-jsonbody-oversizehandling

JsonMatchPatternProperty

class CfnWebACL.JsonMatchPatternProperty(*, all=None, included_paths=None)

Bases: object

The patterns to look for in the JSON body.

AWS WAF inspects the results of these pattern matches against the rule inspection criteria. This is used with the FieldToMatch option JsonBody .

Parameters:
  • all (Optional[Any]) – Match all of the elements. See also MatchScope in the JsonBody FieldToMatch specification. You must specify either this setting or the IncludedPaths setting, but not both.

  • included_paths (Optional[Sequence[str]]) –

    Match only the specified include paths. See also MatchScope in the JsonBody FieldToMatch specification. Provide the include paths using JSON Pointer syntax. For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"] . For information about this syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer . You must specify either this setting or the All setting, but not both. .. epigraph:: Don’t use this option to include all paths. Instead, use the All setting.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonmatchpattern.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

json_match_pattern_property = wafv2.CfnWebACL.JsonMatchPatternProperty(
    all=all,
    included_paths=["includedPaths"]
)

Attributes

all

Match all of the elements. See also MatchScope in the JsonBody FieldToMatch specification.

You must specify either this setting or the IncludedPaths setting, but not both.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonmatchpattern.html#cfn-wafv2-webacl-jsonmatchpattern-all

included_paths

Match only the specified include paths. See also MatchScope in the JsonBody FieldToMatch specification.

Provide the include paths using JSON Pointer syntax. For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"] . For information about this syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer .

You must specify either this setting or the All setting, but not both. .. epigraph:

Don't use this option to include all paths. Instead, use the ``All`` setting.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-jsonmatchpattern.html#cfn-wafv2-webacl-jsonmatchpattern-includedpaths

LabelMatchStatementProperty

class CfnWebACL.LabelMatchStatementProperty(*, key, scope)

Bases: object

A rule statement to match against labels that have been added to the web request by rules that have already run in the web ACL.

The label match statement provides the label or namespace string to search for. The label string can represent a part or all of the fully qualified label name that had been added to the web request. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label. If you do not provide the fully qualified name in your label match string, AWS WAF performs the search for labels that were added in the same context as the label match statement.

Parameters:
  • key (str) – The string to match against. The setting you provide for this depends on the match statement’s Scope setting:. - If the Scope indicates LABEL , then this specification must include the name and can include any number of preceding namespace specifications and prefix up to providing the fully qualified label name. - If the Scope indicates NAMESPACE , then this specification can include any number of contiguous namespace strings, and can include the entire label namespace prefix from the rule group or web ACL where the label originates. Labels are case sensitive and components of a label must be separated by colon, for example NS1:NS2:name .

  • scope (str) – Specify whether you want to match using the label name or just the namespace.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-labelmatchstatement.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

label_match_statement_property = wafv2.CfnWebACL.LabelMatchStatementProperty(
    key="key",
    scope="scope"
)

Attributes

key

.

  • If the Scope indicates LABEL , then this specification must include the name and can include any number of preceding namespace specifications and prefix up to providing the fully qualified label name.

  • If the Scope indicates NAMESPACE , then this specification can include any number of contiguous namespace strings, and can include the entire label namespace prefix from the rule group or web ACL where the label originates.

Labels are case sensitive and components of a label must be separated by colon, for example NS1:NS2:name .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-labelmatchstatement.html#cfn-wafv2-webacl-labelmatchstatement-key

Type:

The string to match against. The setting you provide for this depends on the match statement’s Scope setting

scope

Specify whether you want to match using the label name or just the namespace.

Link:

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

LabelProperty

class CfnWebACL.LabelProperty(*, name)

Bases: object

A single label container.

This is used as an element of a label array in RuleLabels inside a rule.

Parameters:

name (str) – The label string.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-label.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

label_property = wafv2.CfnWebACL.LabelProperty(
    name="name"
)

Attributes

name

The label string.

Link:

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

ManagedRuleGroupConfigProperty

class CfnWebACL.ManagedRuleGroupConfigProperty(*, aws_managed_rules_atp_rule_set=None, aws_managed_rules_bot_control_rule_set=None, login_path=None, password_field=None, payload_type=None, username_field=None)

Bases: object

Additional information that’s used by a managed rule group. Many managed rule groups don’t require this.

Use the AWSManagedRulesBotControlRuleSet configuration object to configure the protection level that you want the Bot Control rule group to use.

Parameters:
  • aws_managed_rules_atp_rule_set (Union[IResolvable, AWSManagedRulesATPRuleSetProperty, Dict[str, Any], None]) – Additional configuration for using the account takeover prevention (ATP) managed rule group, AWSManagedRulesATPRuleSet . Use this to provide login request information to the rule group. For web ACLs that protect CloudFront distributions, use this to also provide the information about how your distribution responds to login requests. This configuration replaces the individual configuration fields in ManagedRuleGroupConfig and provides additional feature configuration. For information about using the ATP managed rule group, see AWS WAF Fraud Control account takeover prevention (ATP) rule group and AWS WAF Fraud Control account takeover prevention (ATP) in the AWS WAF Developer Guide .

  • aws_managed_rules_bot_control_rule_set (Union[IResolvable, AWSManagedRulesBotControlRuleSetProperty, Dict[str, Any], None]) –

    Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection level that you want to use. For information about using the Bot Control managed rule group, see AWS WAF Bot Control rule group and AWS WAF Bot Control in the AWS WAF Developer Guide .

  • login_path (Optional[str]) –

    Instead of this setting, provide your configuration under AWSManagedRulesATPRuleSet .

  • password_field (Union[IResolvable, FieldIdentifierProperty, Dict[str, Any], None]) –

    Instead of this setting, provide your configuration under the request inspection configuration for AWSManagedRulesATPRuleSet or AWSManagedRulesACFPRuleSet .

  • payload_type (Optional[str]) –

    Instead of this setting, provide your configuration under the request inspection configuration for AWSManagedRulesATPRuleSet or AWSManagedRulesACFPRuleSet .

  • username_field (Union[IResolvable, FieldIdentifierProperty, Dict[str, Any], None]) –

    Instead of this setting, provide your configuration under the request inspection configuration for AWSManagedRulesATPRuleSet or AWSManagedRulesACFPRuleSet .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupconfig.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

managed_rule_group_config_property = 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"
    )
)

Attributes

aws_managed_rules_atp_rule_set

Additional configuration for using the account takeover prevention (ATP) managed rule group, AWSManagedRulesATPRuleSet .

Use this to provide login request information to the rule group. For web ACLs that protect CloudFront distributions, use this to also provide the information about how your distribution responds to login requests.

This configuration replaces the individual configuration fields in ManagedRuleGroupConfig and provides additional feature configuration.

For information about using the ATP managed rule group, see AWS WAF Fraud Control account takeover prevention (ATP) rule group and AWS WAF Fraud Control account takeover prevention (ATP) in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupconfig.html#cfn-wafv2-webacl-managedrulegroupconfig-awsmanagedrulesatpruleset

aws_managed_rules_bot_control_rule_set

Additional configuration for using the Bot Control managed rule group.

Use this to specify the inspection level that you want to use. For information about using the Bot Control managed rule group, see AWS WAF Bot Control rule group and AWS WAF Bot Control in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupconfig.html#cfn-wafv2-webacl-managedrulegroupconfig-awsmanagedrulesbotcontrolruleset

login_path
password_field

Instead of this setting, provide your configuration under the request inspection configuration for AWSManagedRulesATPRuleSet or AWSManagedRulesACFPRuleSet .

payload_type

Instead of this setting, provide your configuration under the request inspection configuration for AWSManagedRulesATPRuleSet or AWSManagedRulesACFPRuleSet .

username_field

Instead of this setting, provide your configuration under the request inspection configuration for AWSManagedRulesATPRuleSet or AWSManagedRulesACFPRuleSet .

ManagedRuleGroupStatementProperty

class CfnWebACL.ManagedRuleGroupStatementProperty(*, name, vendor_name, excluded_rules=None, managed_rule_group_configs=None, rule_action_overrides=None, scope_down_statement=None, version=None)

Bases: object

A rule statement used to run the rules that are defined in a managed rule group.

To use this, provide the vendor name and the name of the rule group in this statement.

You cannot nest a ManagedRuleGroupStatement , for example for use inside a NotStatement or OrStatement . It can only be referenced as a top-level statement within a rule.

Parameters:
  • name (str) – The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.

  • vendor_name (str) – The name of the managed rule group vendor. You use this, along with the rule group name, to identify a rule group.

  • excluded_rules (Union[IResolvable, Sequence[Union[IResolvable, ExcludedRuleProperty, Dict[str, Any]]], None]) – Rules in the referenced rule group whose actions are set to Count . .. epigraph:: Instead of this option, use RuleActionOverrides . It accepts any valid action setting, including Count .

  • managed_rule_group_configs (Union[IResolvable, Sequence[Union[IResolvable, ManagedRuleGroupConfigProperty, Dict[str, Any]]], None]) – Additional information that’s used by a managed rule group. Many managed rule groups don’t require this. The rule groups used for intelligent threat mitigation require additional configuration: - Use the AWSManagedRulesACFPRuleSet configuration object to configure the account creation fraud prevention managed rule group. The configuration includes the registration and sign-up pages of your application and the locations in the account creation request payload of data, such as the user email and phone number fields. - Use the AWSManagedRulesATPRuleSet configuration object to configure the account takeover prevention managed rule group. The configuration includes the sign-in page of your application and the locations in the login request payload of data such as the username and password. - Use the AWSManagedRulesBotControlRuleSet configuration object to configure the protection level that you want the Bot Control rule group to use.

  • rule_action_overrides (Union[IResolvable, Sequence[Union[IResolvable, RuleActionOverrideProperty, Dict[str, Any]]], None]) – Action settings to use in the place of the rule actions that are configured inside the rule group. You specify one override for each rule whose action you want to change. You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.

  • scope_down_statement (Union[IResolvable, StatementProperty, Dict[str, Any], None]) – An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group. Requests are only evaluated by the rule group if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.

  • version (Optional[str]) – The version of the managed rule group to use. If you specify this, the version setting is fixed until you change it. If you don’t specify this, AWS WAF uses the vendor’s default version, and then keeps the version at the vendor’s default when the vendor updates the managed rule group settings.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# statement_property_: wafv2.CfnWebACL.StatementProperty
# uri_path: Any

managed_rule_group_statement_property = 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=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"
            )]
        )
    ),
    version="version"
)

Attributes

excluded_rules

Rules in the referenced rule group whose actions are set to Count .

Instead of this option, use RuleActionOverrides . It accepts any valid action setting, including Count .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupstatement.html#cfn-wafv2-webacl-managedrulegroupstatement-excludedrules

managed_rule_group_configs

Additional information that’s used by a managed rule group. Many managed rule groups don’t require this.

The rule groups used for intelligent threat mitigation require additional configuration:

  • Use the AWSManagedRulesACFPRuleSet configuration object to configure the account creation fraud prevention managed rule group. The configuration includes the registration and sign-up pages of your application and the locations in the account creation request payload of data, such as the user email and phone number fields.

  • Use the AWSManagedRulesATPRuleSet configuration object to configure the account takeover prevention managed rule group. The configuration includes the sign-in page of your application and the locations in the login request payload of data such as the username and password.

  • Use the AWSManagedRulesBotControlRuleSet configuration object to configure the protection level that you want the Bot Control rule group to use.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupstatement.html#cfn-wafv2-webacl-managedrulegroupstatement-managedrulegroupconfigs

name

The name of the managed rule group.

You use this, along with the vendor name, to identify the rule group.

Link:

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

rule_action_overrides

Action settings to use in the place of the rule actions that are configured inside the rule group.

You specify one override for each rule whose action you want to change.

You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupstatement.html#cfn-wafv2-webacl-managedrulegroupstatement-ruleactionoverrides

scope_down_statement

An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group.

Requests are only evaluated by the rule group if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupstatement.html#cfn-wafv2-webacl-managedrulegroupstatement-scopedownstatement

vendor_name

The name of the managed rule group vendor.

You use this, along with the rule group name, to identify a rule group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupstatement.html#cfn-wafv2-webacl-managedrulegroupstatement-vendorname

version

The version of the managed rule group to use.

If you specify this, the version setting is fixed until you change it. If you don’t specify this, AWS WAF uses the vendor’s default version, and then keeps the version at the vendor’s default when the vendor updates the managed rule group settings.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-managedrulegroupstatement.html#cfn-wafv2-webacl-managedrulegroupstatement-version

NotStatementProperty

class CfnWebACL.NotStatementProperty(*, statement)

Bases: object

A logical rule statement used to negate the results of another rule statement.

You provide one Statement within the NotStatement .

Parameters:

statement (Union[IResolvable, StatementProperty, Dict[str, Any]]) – The statement to negate. You can use any statement that can be nested.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-notstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# statement_property_: wafv2.CfnWebACL.StatementProperty
# uri_path: Any

not_statement_property = wafv2.CfnWebACL.NotStatementProperty(
    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"
            )]
        )
    )
)

Attributes

statement

The statement to negate.

You can use any statement that can be nested.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-notstatement.html#cfn-wafv2-webacl-notstatement-statement

OrStatementProperty

class CfnWebACL.OrStatementProperty(*, statements)

Bases: object

A logical rule statement used to combine other rule statements with OR logic.

You provide more than one Statement within the OrStatement .

Parameters:

statements (Union[IResolvable, Sequence[Union[IResolvable, StatementProperty, Dict[str, Any]]]]) – The statements to combine with OR logic. You can use any statements that can be nested.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-orstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# statement_property_: wafv2.CfnWebACL.StatementProperty
# uri_path: Any

or_statement_property = wafv2.CfnWebACL.OrStatementProperty(
    statements=[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"
            )]
        )
    )]
)

Attributes

statements

The statements to combine with OR logic.

You can use any statements that can be nested.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-orstatement.html#cfn-wafv2-webacl-orstatement-statements

OverrideActionProperty

class CfnWebACL.OverrideActionProperty(*, count=None, none=None)

Bases: object

The action to use in the place of the action that results from the rule group evaluation.

Set the override action to none to leave the result of the rule group alone. Set it to count to override the result to count only.

You can only use this for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement . .. epigraph:

This option is usually set to none. It does not affect how the rules in the rule group are evaluated. If you want the rules in the rule group to only count matches, do not use this and instead use the rule action override option, with ``Count`` action, in your rule group reference statement settings.
Parameters:
  • count (Optional[Any]) – Override the rule group evaluation result to count only. .. epigraph:: This option is usually set to none. It does not affect how the rules in the rule group are evaluated. If you want the rules in the rule group to only count matches, do not use this and instead use the rule action override option, with Count action, in your rule group reference statement settings.

  • none (Optional[Any]) – Don’t override the rule group evaluation result. This is the most common setting.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-overrideaction.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

# count: Any
# none: Any

override_action_property = wafv2.CfnWebACL.OverrideActionProperty(
    count=count,
    none=none
)

Attributes

count

Override the rule group evaluation result to count only.

This option is usually set to none. It does not affect how the rules in the rule group are evaluated. If you want the rules in the rule group to only count matches, do not use this and instead use the rule action override option, with Count action, in your rule group reference statement settings.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-overrideaction.html#cfn-wafv2-webacl-overrideaction-count

none

Don’t override the rule group evaluation result.

This is the most common setting.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-overrideaction.html#cfn-wafv2-webacl-overrideaction-none

RateBasedStatementProperty

class CfnWebACL.RateBasedStatementProperty(*, aggregate_key_type, limit, forwarded_ip_config=None, scope_down_statement=None)

Bases: object

A rate-based rule tracks the rate of requests for each originating IP address, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any 5-minute time span.

You can use this to put a temporary block on requests from an IP address that is sending excessive requests.

AWS WAF tracks and manages web requests separately for each instance of a rate-based rule that you use. For example, if you provide the same rate-based rule settings in two web ACLs, each of the two rule statements represents a separate instance of the rate-based rule and gets its own tracking and management by AWS WAF . If you define a rate-based rule inside a rule group, and then use that rule group in multiple places, each use creates a separate instance of the rate-based rule that gets its own tracking and management by AWS WAF .

When the rule action triggers, AWS WAF blocks additional requests from the IP address until the request rate falls below the limit.

You can optionally nest another statement inside the rate-based statement, to narrow the scope of the rule so that it only counts requests that match the nested statement. For example, based on recent requests that you have seen from an attacker, you might create a rate-based rule with a nested AND rule statement that contains the following nested statements:

  • An IP match statement with an IP set that specifies the address 192.0.2.44.

  • A string match statement that searches in the User-Agent header for the string BadBot.

In this rate-based rule, you also define a rate limit. For this example, the rate limit is 1,000. Requests that meet the criteria of both of the nested statements are counted. If the count exceeds 1,000 requests per five minutes, the rule action triggers. Requests that do not meet the criteria of both of the nested statements are not counted towards the rate limit and are not affected by this rule.

You cannot nest a RateBasedStatement inside another statement, for example inside a NotStatement or OrStatement . You can define a RateBasedStatement inside a web ACL and inside a rule group.

Parameters:
  • aggregate_key_type (str) – Setting that indicates how to aggregate the request counts. The options are the following:. - IP - Aggregate the request counts on the IP address from the web request origin. - FORWARDED_IP - Aggregate the request counts on the first IP address in an HTTP header. If you use this, configure the ForwardedIPConfig , to specify the header to use. .. epigraph:: You can only use the IP and FORWARDED_IP key types.

  • limit (Union[int, float]) – The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement , this limit is applied only to the requests that match the statement.

  • forwarded_ip_config (Union[IResolvable, ForwardedIPConfigurationProperty, Dict[str, Any], None]) – The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that’s reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name. .. epigraph:: If the specified header isn’t present in the request, AWS WAF doesn’t apply the rule to the web request at all. This is required if you specify a forwarded IP in the rule’s aggregate key settings.

  • scope_down_statement (Union[IResolvable, StatementProperty, Dict[str, Any], None]) – An optional nested statement that narrows the scope of the web requests that are evaluated by the rate-based statement. Requests are only tracked by the rate-based statement if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ratebasedstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# statement_property_: wafv2.CfnWebACL.StatementProperty
# uri_path: Any

rate_based_statement_property = 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=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"
            )]
        )
    )
)

Attributes

aggregate_key_type

.

  • IP - Aggregate the request counts on the IP address from the web request origin.

  • FORWARDED_IP - Aggregate the request counts on the first IP address in an HTTP header. If you use this, configure the ForwardedIPConfig , to specify the header to use.

You can only use the IP and FORWARDED_IP key types.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ratebasedstatement.html#cfn-wafv2-webacl-ratebasedstatement-aggregatekeytype

Type:

Setting that indicates how to aggregate the request counts. The options are the following

forwarded_ip_config

The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that’s reported by the web request origin.

Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name. .. epigraph:

If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.

This is required if you specify a forwarded IP in the rule’s aggregate key settings.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ratebasedstatement.html#cfn-wafv2-webacl-ratebasedstatement-forwardedipconfig

limit

The limit on requests per 5-minute period for a single originating IP address.

If the statement includes a ScopeDownStatement , this limit is applied only to the requests that match the statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ratebasedstatement.html#cfn-wafv2-webacl-ratebasedstatement-limit

scope_down_statement

An optional nested statement that narrows the scope of the web requests that are evaluated by the rate-based statement.

Requests are only tracked by the rate-based statement if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ratebasedstatement.html#cfn-wafv2-webacl-ratebasedstatement-scopedownstatement

RegexMatchStatementProperty

class CfnWebACL.RegexMatchStatementProperty(*, field_to_match, regex_string, text_transformations)

Bases: object

A rule statement used to search web request components for a match against a single regular expression.

Parameters:
  • field_to_match (Union[IResolvable, FieldToMatchProperty, Dict[str, Any]]) – The part of the web request that you want AWS WAF to inspect.

  • regex_string (str) – The string representing the regular expression.

  • text_transformations (Union[IResolvable, Sequence[Union[IResolvable, TextTransformationProperty, Dict[str, Any]]]]) – Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexmatchstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# uri_path: Any

regex_match_statement_property = 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"
    )]
)

Attributes

field_to_match

The part of the web request that you want AWS WAF to inspect.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexmatchstatement.html#cfn-wafv2-webacl-regexmatchstatement-fieldtomatch

regex_string

The string representing the regular expression.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexmatchstatement.html#cfn-wafv2-webacl-regexmatchstatement-regexstring

text_transformations

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.

If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexmatchstatement.html#cfn-wafv2-webacl-regexmatchstatement-texttransformations

RegexPatternSetReferenceStatementProperty

class CfnWebACL.RegexPatternSetReferenceStatementProperty(*, arn, field_to_match, text_transformations)

Bases: object

A rule statement used to search web request components for matches with regular expressions.

To use this, create a RegexPatternSet that specifies the expressions that you want to detect, then use that set in this statement. A web request matches the pattern set rule statement if the request component matches any of the patterns in the set.

Each regex pattern set rule statement references a regex pattern set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, AWS WAF automatically updates all rules that reference it.

Parameters:
  • arn (str) – The Amazon Resource Name (ARN) of the RegexPatternSet that this statement references.

  • field_to_match (Union[IResolvable, FieldToMatchProperty, Dict[str, Any]]) – The part of the web request that you want AWS WAF to inspect.

  • text_transformations (Union[IResolvable, Sequence[Union[IResolvable, TextTransformationProperty, Dict[str, Any]]]]) – Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexpatternsetreferencestatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# uri_path: Any

regex_pattern_set_reference_statement_property = 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"
    )]
)

Attributes

arn

The Amazon Resource Name (ARN) of the RegexPatternSet that this statement references.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexpatternsetreferencestatement.html#cfn-wafv2-webacl-regexpatternsetreferencestatement-arn

field_to_match

The part of the web request that you want AWS WAF to inspect.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexpatternsetreferencestatement.html#cfn-wafv2-webacl-regexpatternsetreferencestatement-fieldtomatch

text_transformations

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.

If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-regexpatternsetreferencestatement.html#cfn-wafv2-webacl-regexpatternsetreferencestatement-texttransformations

RequestInspectionProperty

class CfnWebACL.RequestInspectionProperty(*, password_field, payload_type, username_field)

Bases: object

The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage.

This is part of the AWSManagedRulesATPRuleSet configuration in ManagedRuleGroupConfig .

In these settings, you specify how your application accepts login attempts by providing the request payload type and the names of the fields within the request body where the username and password are provided.

Parameters:
  • password_field (Union[IResolvable, FieldIdentifierProperty, Dict[str, Any]]) –

    The name of the field in the request payload that contains your customer’s password. How you specify this depends on the request inspection payload type. - For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer . For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } } , the password field specification is /form/password . - For form encoded payload types, use the HTML form names. For example, for an HTML form with the input element named password1 , the password field specification is password1 .

  • payload_type (str) – The payload type for your login endpoint, either JSON or form encoded.

  • username_field (Union[IResolvable, FieldIdentifierProperty, Dict[str, Any]]) –

    The name of the field in the request payload that contains your customer’s username. How you specify this depends on the request inspection payload type. - For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer . For example, for the JSON payload { "form": { "username": "THE_USERNAME" } } , the username field specification is /form/username . - For form encoded payload types, use the HTML form names. For example, for an HTML form with the input element named username1 , the username field specification is username1

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-requestinspection.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

request_inspection_property = wafv2.CfnWebACL.RequestInspectionProperty(
    password_field=wafv2.CfnWebACL.FieldIdentifierProperty(
        identifier="identifier"
    ),
    payload_type="payloadType",
    username_field=wafv2.CfnWebACL.FieldIdentifierProperty(
        identifier="identifier"
    )
)

Attributes

password_field

The name of the field in the request payload that contains your customer’s password.

How you specify this depends on the request inspection payload type.

  • For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer .

For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } } , the password field specification is /form/password .

  • For form encoded payload types, use the HTML form names.

For example, for an HTML form with the input element named password1 , the password field specification is password1 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-requestinspection.html#cfn-wafv2-webacl-requestinspection-passwordfield

payload_type

The payload type for your login endpoint, either JSON or form encoded.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-requestinspection.html#cfn-wafv2-webacl-requestinspection-payloadtype

username_field

The name of the field in the request payload that contains your customer’s username.

How you specify this depends on the request inspection payload type.

  • For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer .

For example, for the JSON payload { "form": { "username": "THE_USERNAME" } } , the username field specification is /form/username .

  • For form encoded payload types, use the HTML form names.

For example, for an HTML form with the input element named username1 , the username field specification is username1

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-requestinspection.html#cfn-wafv2-webacl-requestinspection-usernamefield

ResponseInspectionBodyContainsProperty

class CfnWebACL.ResponseInspectionBodyContainsProperty(*, failure_strings, success_strings)

Bases: object

Configures inspection of the response body.

AWS WAF can inspect the first 65,536 bytes (64 KB) of the response body. This is part of the ResponseInspection configuration for AWSManagedRulesATPRuleSet and AWSManagedRulesACFPRuleSet . .. epigraph:

Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.
Parameters:
  • failure_strings (Sequence[str]) – Strings in the body of the response that indicate a failed login or account creation attempt. To be counted as a failure, the string can be anywhere in the body and must be an exact match, including case. Each string must be unique among the success and failure strings. JSON example: "FailureStrings": [ "Request failed" ]

  • success_strings (Sequence[str]) – Strings in the body of the response that indicate a successful login or account creation attempt. To be counted as a success, the string can be anywhere in the body and must be an exact match, including case. Each string must be unique among the success and failure strings. JSON examples: "SuccessStrings": [ "Login successful" ] and "SuccessStrings": [ "Account creation successful", "Welcome to our site!" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionbodycontains.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

response_inspection_body_contains_property = wafv2.CfnWebACL.ResponseInspectionBodyContainsProperty(
    failure_strings=["failureStrings"],
    success_strings=["successStrings"]
)

Attributes

failure_strings

Strings in the body of the response that indicate a failed login or account creation attempt.

To be counted as a failure, the string can be anywhere in the body and must be an exact match, including case. Each string must be unique among the success and failure strings.

JSON example: "FailureStrings": [ "Request failed" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionbodycontains.html#cfn-wafv2-webacl-responseinspectionbodycontains-failurestrings

success_strings

Strings in the body of the response that indicate a successful login or account creation attempt.

To be counted as a success, the string can be anywhere in the body and must be an exact match, including case. Each string must be unique among the success and failure strings.

JSON examples: "SuccessStrings": [ "Login successful" ] and "SuccessStrings": [ "Account creation successful", "Welcome to our site!" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionbodycontains.html#cfn-wafv2-webacl-responseinspectionbodycontains-successstrings

ResponseInspectionHeaderProperty

class CfnWebACL.ResponseInspectionHeaderProperty(*, failure_values, name, success_values)

Bases: object

Configures inspection of the response header. This is part of the ResponseInspection configuration for AWSManagedRulesATPRuleSet and AWSManagedRulesACFPRuleSet .

Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.

Parameters:
  • failure_values (Sequence[str]) – Values in the response header with the specified name that indicate a failed login or account creation attempt. To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the success and failure values. JSON examples: "FailureValues": [ "LoginFailed", "Failed login" ] and "FailureValues": [ "AccountCreationFailed" ]

  • name (str) – The name of the header to match against. The name must be an exact match, including case. JSON example: "Name": [ "RequestResult" ]

  • success_values (Sequence[str]) – Values in the response header with the specified name that indicate a successful login or account creation attempt. To be counted as a success, the value must be an exact match, including case. Each value must be unique among the success and failure values. JSON examples: "SuccessValues": [ "LoginPassed", "Successful login" ] and "SuccessValues": [ "AccountCreated", "Successful account creation" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionheader.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

response_inspection_header_property = wafv2.CfnWebACL.ResponseInspectionHeaderProperty(
    failure_values=["failureValues"],
    name="name",
    success_values=["successValues"]
)

Attributes

failure_values

Values in the response header with the specified name that indicate a failed login or account creation attempt.

To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the success and failure values.

JSON examples: "FailureValues": [ "LoginFailed", "Failed login" ] and "FailureValues": [ "AccountCreationFailed" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionheader.html#cfn-wafv2-webacl-responseinspectionheader-failurevalues

name

The name of the header to match against. The name must be an exact match, including case.

JSON example: "Name": [ "RequestResult" ]

Link:

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

success_values

Values in the response header with the specified name that indicate a successful login or account creation attempt.

To be counted as a success, the value must be an exact match, including case. Each value must be unique among the success and failure values.

JSON examples: "SuccessValues": [ "LoginPassed", "Successful login" ] and "SuccessValues": [ "AccountCreated", "Successful account creation" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionheader.html#cfn-wafv2-webacl-responseinspectionheader-successvalues

ResponseInspectionJsonProperty

class CfnWebACL.ResponseInspectionJsonProperty(*, failure_values, identifier, success_values)

Bases: object

Configures inspection of the response JSON.

AWS WAF can inspect the first 65,536 bytes (64 KB) of the response JSON. This is part of the ResponseInspection configuration for AWSManagedRulesATPRuleSet and AWSManagedRulesACFPRuleSet . .. epigraph:

Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.
Parameters:
  • failure_values (Sequence[str]) – Values for the specified identifier in the response JSON that indicate a failed login or account creation attempt. To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the success and failure values. JSON example: "FailureValues": [ "False", "Failed" ]

  • identifier (str) – The identifier for the value to match against in the JSON. The identifier must be an exact match, including case. JSON examples: "Identifier": [ "/login/success" ] and "Identifier": [ "/sign-up/success" ]

  • success_values (Sequence[str]) – Values for the specified identifier in the response JSON that indicate a successful login or account creation attempt. To be counted as a success, the value must be an exact match, including case. Each value must be unique among the success and failure values. JSON example: "SuccessValues": [ "True", "Succeeded" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionjson.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

response_inspection_json_property = wafv2.CfnWebACL.ResponseInspectionJsonProperty(
    failure_values=["failureValues"],
    identifier="identifier",
    success_values=["successValues"]
)

Attributes

failure_values

Values for the specified identifier in the response JSON that indicate a failed login or account creation attempt.

To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the success and failure values.

JSON example: "FailureValues": [ "False", "Failed" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionjson.html#cfn-wafv2-webacl-responseinspectionjson-failurevalues

identifier

The identifier for the value to match against in the JSON.

The identifier must be an exact match, including case.

JSON examples: "Identifier": [ "/login/success" ] and "Identifier": [ "/sign-up/success" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionjson.html#cfn-wafv2-webacl-responseinspectionjson-identifier

success_values

Values for the specified identifier in the response JSON that indicate a successful login or account creation attempt.

To be counted as a success, the value must be an exact match, including case. Each value must be unique among the success and failure values.

JSON example: "SuccessValues": [ "True", "Succeeded" ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionjson.html#cfn-wafv2-webacl-responseinspectionjson-successvalues

ResponseInspectionProperty

class CfnWebACL.ResponseInspectionProperty(*, body_contains=None, header=None, json=None, status_code=None)

Bases: object

The criteria for inspecting responses to login requests and account creation requests, used by the ATP and ACFP rule groups to track login and account creation success and failure rates.

Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.

The rule groups evaluates the responses that your protected resources send back to client login and account creation attempts, keeping count of successful and failed attempts from each IP address and client session. Using this information, the rule group labels and mitigates requests from client sessions and IP addresses with too much suspicious activity in a short amount of time.

This is part of the AWSManagedRulesATPRuleSet and AWSManagedRulesACFPRuleSet configurations in ManagedRuleGroupConfig .

Enable response inspection by configuring exactly one component of the response to inspect, for example, Header or StatusCode . You can’t configure more than one component for inspection. If you don’t configure any of the response inspection options, response inspection is disabled.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspection.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

response_inspection_property = 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]
    )
)

Attributes

body_contains

Configures inspection of the response body for success and failure indicators.

AWS WAF can inspect the first 65,536 bytes (64 KB) of the response body.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspection.html#cfn-wafv2-webacl-responseinspection-bodycontains

header

Configures inspection of the response header for success and failure indicators.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspection.html#cfn-wafv2-webacl-responseinspection-header

json

Configures inspection of the response JSON for success and failure indicators.

AWS WAF can inspect the first 65,536 bytes (64 KB) of the response JSON.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspection.html#cfn-wafv2-webacl-responseinspection-json

status_code

Configures inspection of the response status code for success and failure indicators.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspection.html#cfn-wafv2-webacl-responseinspection-statuscode

ResponseInspectionStatusCodeProperty

class CfnWebACL.ResponseInspectionStatusCodeProperty(*, failure_codes, success_codes)

Bases: object

Configures inspection of the response status code. This is part of the ResponseInspection configuration for AWSManagedRulesATPRuleSet and AWSManagedRulesACFPRuleSet .

Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.

Parameters:
  • failure_codes (Union[IResolvable, Sequence[Union[int, float]]]) – Status codes in the response that indicate a failed login or account creation attempt. To be counted as a failure, the response status code must match one of these. Each code must be unique among the success and failure status codes. JSON example: "FailureCodes": [ 400, 404 ]

  • success_codes (Union[IResolvable, Sequence[Union[int, float]]]) – Status codes in the response that indicate a successful login or account creation attempt. To be counted as a success, the response status code must match one of these. Each code must be unique among the success and failure status codes. JSON example: "SuccessCodes": [ 200, 201 ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionstatuscode.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

response_inspection_status_code_property = wafv2.CfnWebACL.ResponseInspectionStatusCodeProperty(
    failure_codes=[123],
    success_codes=[123]
)

Attributes

failure_codes

Status codes in the response that indicate a failed login or account creation attempt.

To be counted as a failure, the response status code must match one of these. Each code must be unique among the success and failure status codes.

JSON example: "FailureCodes": [ 400, 404 ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionstatuscode.html#cfn-wafv2-webacl-responseinspectionstatuscode-failurecodes

success_codes

Status codes in the response that indicate a successful login or account creation attempt.

To be counted as a success, the response status code must match one of these. Each code must be unique among the success and failure status codes.

JSON example: "SuccessCodes": [ 200, 201 ]

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-responseinspectionstatuscode.html#cfn-wafv2-webacl-responseinspectionstatuscode-successcodes

RuleActionOverrideProperty

class CfnWebACL.RuleActionOverrideProperty(*, action_to_use, name)

Bases: object

Action setting to use in the place of a rule action that is configured inside the rule group.

You specify one override for each rule whose action you want to change.

You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.

Parameters:
  • action_to_use (Union[IResolvable, RuleActionProperty, Dict[str, Any]]) – The override action to use, in place of the configured action of the rule in the rule group.

  • name (str) – The name of the rule to override.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleactionoverride.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

rule_action_override_property = 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"
)

Attributes

action_to_use

The override action to use, in place of the configured action of the rule in the rule group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleactionoverride.html#cfn-wafv2-webacl-ruleactionoverride-actiontouse

name

The name of the rule to override.

Link:

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

RuleActionProperty

class CfnWebACL.RuleActionProperty(*, allow=None, block=None, captcha=None, challenge=None, count=None)

Bases: object

The action that AWS WAF should take on a web request when it matches a rule’s statement.

Settings at the web ACL level can override the rule action setting.

Parameters:
  • allow (Union[IResolvable, AllowActionProperty, Dict[str, Any], None]) – Instructs AWS WAF to allow the web request.

  • block (Union[IResolvable, BlockActionProperty, Dict[str, Any], None]) – Instructs AWS WAF to block the web request.

  • captcha (Union[IResolvable, CaptchaActionProperty, Dict[str, Any], None]) – Specifies that AWS WAF should run a CAPTCHA check against the request:. - If the request includes a valid, unexpired CAPTCHA token, AWS WAF allows the web request inspection to proceed to the next rule, similar to a CountAction . - If the request doesn’t include a valid, unexpired CAPTCHA token, AWS WAF discontinues the web ACL evaluation of the request and blocks it from going to its intended destination. AWS WAF generates a response that it sends back to the client, which includes the following: - The header x-amzn-waf-action with a value of captcha . - The HTTP status code 405 Method Not Allowed . - If the request contains an Accept header with a value of text/html , the response includes a CAPTCHA challenge. You can configure the expiration time in the CaptchaConfig ImmunityTimeProperty setting at the rule and web ACL level. The rule setting overrides the web ACL setting. This action option is available for rules. It isn’t available for web ACL default actions.

  • challenge (Union[IResolvable, ChallengeActionProperty, Dict[str, Any], None]) – Instructs AWS WAF to run a Challenge check against the web request.

  • count (Union[IResolvable, CountActionProperty, Dict[str, Any], None]) – Instructs AWS WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.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

rule_action_property = 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"
            )]
        )
    )
)

Attributes

allow

Instructs AWS WAF to allow the web request.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.html#cfn-wafv2-webacl-ruleaction-allow

block

Instructs AWS WAF to block the web request.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.html#cfn-wafv2-webacl-ruleaction-block

captcha

.

  • If the request includes a valid, unexpired CAPTCHA token, AWS WAF allows the web request inspection to proceed to the next rule, similar to a CountAction .

  • If the request doesn’t include a valid, unexpired CAPTCHA token, AWS WAF discontinues the web ACL evaluation of the request and blocks it from going to its intended destination.

AWS WAF generates a response that it sends back to the client, which includes the following:

  • The header x-amzn-waf-action with a value of captcha .

  • The HTTP status code 405 Method Not Allowed .

  • If the request contains an Accept header with a value of text/html , the response includes a CAPTCHA challenge.

You can configure the expiration time in the CaptchaConfig ImmunityTimeProperty setting at the rule and web ACL level. The rule setting overrides the web ACL setting.

This action option is available for rules. It isn’t available for web ACL default actions.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.html#cfn-wafv2-webacl-ruleaction-captcha

Type:

Specifies that AWS WAF should run a CAPTCHA check against the request

challenge

Instructs AWS WAF to run a Challenge check against the web request.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.html#cfn-wafv2-webacl-ruleaction-challenge

count

Instructs AWS WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.html#cfn-wafv2-webacl-ruleaction-count

RuleGroupReferenceStatementProperty

class CfnWebACL.RuleGroupReferenceStatementProperty(*, arn, excluded_rules=None, rule_action_overrides=None)

Bases: object

A rule statement used to run the rules that are defined in a RuleGroup .

To use this, create a rule group with your rules, then provide the ARN of the rule group in this statement.

You cannot nest a RuleGroupReferenceStatement , for example for use inside a NotStatement or OrStatement . You can only use a rule group reference statement at the top level inside a web ACL.

Parameters:
  • arn (str) – The Amazon Resource Name (ARN) of the entity.

  • excluded_rules (Union[IResolvable, Sequence[Union[IResolvable, ExcludedRuleProperty, Dict[str, Any]]], None]) – Rules in the referenced rule group whose actions are set to Count . .. epigraph:: Instead of this option, use RuleActionOverrides . It accepts any valid action setting, including Count .

  • rule_action_overrides (Union[IResolvable, Sequence[Union[IResolvable, RuleActionOverrideProperty, Dict[str, Any]]], None]) – Action settings to use in the place of the rule actions that are configured inside the rule group. You specify one override for each rule whose action you want to change. You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rulegroupreferencestatement.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

rule_group_reference_statement_property = 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"
    )]
)

Attributes

arn

The Amazon Resource Name (ARN) of the entity.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rulegroupreferencestatement.html#cfn-wafv2-webacl-rulegroupreferencestatement-arn

excluded_rules

Rules in the referenced rule group whose actions are set to Count .

Instead of this option, use RuleActionOverrides . It accepts any valid action setting, including Count .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rulegroupreferencestatement.html#cfn-wafv2-webacl-rulegroupreferencestatement-excludedrules

rule_action_overrides

Action settings to use in the place of the rule actions that are configured inside the rule group.

You specify one override for each rule whose action you want to change.

You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rulegroupreferencestatement.html#cfn-wafv2-webacl-rulegroupreferencestatement-ruleactionoverrides

RuleProperty

class CfnWebACL.RuleProperty(*, name, priority, statement, visibility_config, action=None, captcha_config=None, challenge_config=None, override_action=None, rule_labels=None)

Bases: object

A single rule, which you can use in a WebACL or RuleGroup to identify 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.

Parameters:
  • name (str) – The name of the rule. You can’t change the name of a Rule after you create it.

  • priority (Union[int, float]) – If you define more than one Rule in a WebACL , AWS WAF evaluates each request against the Rules in order based on the value of Priority . AWS WAF processes rules with lower priority first. The priorities don’t need to be consecutive, but they must all be different.

  • statement (Union[IResolvable, StatementProperty, Dict[str, Any]]) – The AWS WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement .

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

  • action (Union[IResolvable, RuleActionProperty, Dict[str, Any], None]) – The action that AWS WAF should take on a web request when it matches the rule’s statement. Settings at the web ACL level can override the rule action setting. This is used only for rules whose statements don’t reference a rule group. Rule statements that reference a rule group are RuleGroupReferenceStatement and ManagedRuleGroupStatement . You must set either this Action setting or the rule’s OverrideAction , but not both: - If the rule statement doesn’t reference a rule group, you must set this rule action setting and you must not set the rule’s override action setting. - If the rule statement references a rule group, you must not set this action setting, because the actions are already set on the rules inside the rule group. You must set the rule’s override action setting to indicate specifically whether to override the actions that are set on the rules in the rule group.

  • captcha_config (Union[IResolvable, CaptchaConfigProperty, Dict[str, Any], None]) – Specifies how AWS WAF should handle CAPTCHA evaluations. If you don’t specify this, AWS WAF uses the CAPTCHA configuration that’s defined for the web ACL.

  • challenge_config (Union[IResolvable, ChallengeConfigProperty, Dict[str, Any], None]) – Specifies how AWS WAF should handle Challenge evaluations. If you don’t specify this, AWS WAF uses the challenge configuration that’s defined for the web ACL.

  • override_action (Union[IResolvable, OverrideActionProperty, Dict[str, Any], None]) – The override action to apply to the rules in a rule group, instead of the individual rule action settings. This is used only for rules whose statements reference a rule group. Rule statements that reference a rule group are RuleGroupReferenceStatement and ManagedRuleGroupStatement . Set the override action to none to leave the rule group rule actions in effect. Set it to count to only count matches, regardless of the rule action settings. You must set either this OverrideAction setting or the Action setting, but not both: - If the rule statement references a rule group, you must set this override action setting and you must not set the rule’s action setting. - If the rule statement doesn’t reference a rule group, you must set the rule action setting and you must not set the rule’s override action setting.

  • rule_labels (Union[IResolvable, Sequence[Union[IResolvable, LabelProperty, Dict[str, Any]]], None]) – Labels to apply to web requests that match the rule match statement. AWS WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule’s rule group or web ACL defines the label namespace. Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement . For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines: - Separate each component of the label with a colon. - Each namespace or name can have up to 128 characters. - You can specify up to 5 namespaces in a label. - Don’t use the following reserved words in your label specification: aws , waf , managed , rulegroup , webacl , regexpatternset , or ipset . For example, myLabelName or nameSpace1:nameSpace2:myLabelName .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rule.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

rule_property = 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"
    )]
)

Attributes

action

The action that AWS WAF should take on a web request when it matches the rule’s statement.

Settings at the web ACL level can override the rule action setting.

This is used only for rules whose statements don’t reference a rule group. Rule statements that reference a rule group are RuleGroupReferenceStatement and ManagedRuleGroupStatement .

You must set either this Action setting or the rule’s OverrideAction , but not both:

  • If the rule statement doesn’t reference a rule group, you must set this rule action setting and you must not set the rule’s override action setting.

  • If the rule statement references a rule group, you must not set this action setting, because the actions are already set on the rules inside the rule group. You must set the rule’s override action setting to indicate specifically whether to override the actions that are set on the rules in the rule group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rule.html#cfn-wafv2-webacl-rule-action

captcha_config

Specifies how AWS WAF should handle CAPTCHA evaluations.

If you don’t specify this, AWS WAF uses the CAPTCHA configuration that’s defined for the web ACL.

Link:

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

challenge_config

Specifies how AWS WAF should handle Challenge evaluations.

If you don’t specify this, AWS WAF uses the challenge configuration that’s defined for the web ACL.

Link:

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

name

The name of the rule.

You can’t change the name of a Rule after you create it.

Link:

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

override_action

The override action to apply to the rules in a rule group, instead of the individual rule action settings.

This is used only for rules whose statements reference a rule group. Rule statements that reference a rule group are RuleGroupReferenceStatement and ManagedRuleGroupStatement .

Set the override action to none to leave the rule group rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.

You must set either this OverrideAction setting or the Action setting, but not both:

  • If the rule statement references a rule group, you must set this override action setting and you must not set the rule’s action setting.

  • If the rule statement doesn’t reference a rule group, you must set the rule action setting and you must not set the rule’s override action setting.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rule.html#cfn-wafv2-webacl-rule-overrideaction

priority

If you define more than one Rule in a WebACL , AWS WAF evaluates each request against the Rules in order based on the value of Priority .

AWS WAF processes rules with lower priority first. The priorities don’t need to be consecutive, but they must all be different.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rule.html#cfn-wafv2-webacl-rule-priority

rule_labels

Labels to apply to web requests that match the rule match statement.

AWS WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule’s rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement .

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don’t use the following reserved words in your label specification: aws , waf , managed , rulegroup , webacl , regexpatternset , or ipset .

For example, myLabelName or nameSpace1:nameSpace2:myLabelName .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rule.html#cfn-wafv2-webacl-rule-rulelabels

statement

The AWS WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-rule.html#cfn-wafv2-webacl-rule-statement

visibility_config

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

Link:

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

SingleHeaderProperty

class CfnWebACL.SingleHeaderProperty(*, name)

Bases: object

Inspect one of the headers in the web request, identified by name, for example, User-Agent or Referer .

The name isn’t case sensitive.

You can filter and inspect all headers with the FieldToMatch setting Headers .

This is used to indicate the web request component to inspect, in the FieldToMatch specification.

Example JSON: "SingleHeader": { "Name": "haystack" }

Parameters:

name (str) – The name of the query header to inspect.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-singleheader.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

single_header_property = wafv2.CfnWebACL.SingleHeaderProperty(
    name="name"
)

Attributes

name

The name of the query header to inspect.

Link:

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

SingleQueryArgumentProperty

class CfnWebACL.SingleQueryArgumentProperty(*, name)

Bases: object

Inspect one query argument in the web request, identified by name, for example UserName or SalesRegion .

The name isn’t case sensitive.

This is used to indicate the web request component to inspect, in the FieldToMatch specification.

Example JSON: "SingleQueryArgument": { "Name": "myArgument" }

Parameters:

name (str) – The name of the query argument to inspect.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-singlequeryargument.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

single_query_argument_property = wafv2.CfnWebACL.SingleQueryArgumentProperty(
    name="name"
)

Attributes

name

The name of the query argument to inspect.

Link:

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

SizeConstraintStatementProperty

class CfnWebACL.SizeConstraintStatementProperty(*, comparison_operator, field_to_match, size, text_transformations)

Bases: object

A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<).

For example, you can use a size constraint statement to look for query strings that are longer than 100 bytes.

If you configure AWS WAF to inspect the request body, AWS WAF inspects only the number of bytes of the body up to the limit for the web ACL. By default, for regional web ACLs, this limit is 8 KB (8,192 kilobytes) and for CloudFront web ACLs, this limit is 16 KB (16,384 kilobytes). For CloudFront web ACLs, you can increase the limit in the web ACL AssociationConfig , for additional fees. If you know that the request body for your web requests should never exceed the inspection limit, you could use a size constraint statement to block requests that have a larger request body size.

If you choose URI for the value of Part of the request to filter on, the slash (/) in the URI counts as one character. For example, the URI /logo.jpg is nine characters long.

Parameters:
  • comparison_operator (str) – The operator to use to compare the request part to the size setting.

  • field_to_match (Union[IResolvable, FieldToMatchProperty, Dict[str, Any]]) – The part of the web request that you want AWS WAF to inspect.

  • size (Union[int, float]) – The size, in byte, to compare to the request part, after any transformations.

  • text_transformations (Union[IResolvable, Sequence[Union[IResolvable, TextTransformationProperty, Dict[str, Any]]]]) – Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sizeconstraintstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# uri_path: Any

size_constraint_statement_property = 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"
    )]
)

Attributes

comparison_operator

The operator to use to compare the request part to the size setting.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sizeconstraintstatement.html#cfn-wafv2-webacl-sizeconstraintstatement-comparisonoperator

field_to_match

The part of the web request that you want AWS WAF to inspect.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sizeconstraintstatement.html#cfn-wafv2-webacl-sizeconstraintstatement-fieldtomatch

size

The size, in byte, to compare to the request part, after any transformations.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sizeconstraintstatement.html#cfn-wafv2-webacl-sizeconstraintstatement-size

text_transformations

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.

If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sizeconstraintstatement.html#cfn-wafv2-webacl-sizeconstraintstatement-texttransformations

SqliMatchStatementProperty

class CfnWebACL.SqliMatchStatementProperty(*, field_to_match, text_transformations, sensitivity_level=None)

Bases: object

A rule statement that inspects for malicious SQL code.

Attackers insert malicious SQL code into web requests to do things like modify your database or extract data from it.

Parameters:
  • field_to_match (Union[IResolvable, FieldToMatchProperty, Dict[str, Any]]) – The part of the web request that you want AWS WAF to inspect.

  • text_transformations (Union[IResolvable, Sequence[Union[IResolvable, TextTransformationProperty, Dict[str, Any]]]]) – Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

  • sensitivity_level (Optional[str]) – The sensitivity that you want AWS WAF to use to inspect for SQL injection attacks. HIGH detects more attacks, but might generate more false positives, especially if your web requests frequently contain unusual strings. For information about identifying and mitigating false positives, see Testing and tuning in the AWS WAF Developer Guide . LOW is generally a better choice for resources that already have other protections against SQL injection attacks or that have a low tolerance for false positives. Default: LOW

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sqlimatchstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# uri_path: Any

sqli_match_statement_property = 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"
)

Attributes

field_to_match

The part of the web request that you want AWS WAF to inspect.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sqlimatchstatement.html#cfn-wafv2-webacl-sqlimatchstatement-fieldtomatch

sensitivity_level

The sensitivity that you want AWS WAF to use to inspect for SQL injection attacks.

HIGH detects more attacks, but might generate more false positives, especially if your web requests frequently contain unusual strings. For information about identifying and mitigating false positives, see Testing and tuning in the AWS WAF Developer Guide .

LOW is generally a better choice for resources that already have other protections against SQL injection attacks or that have a low tolerance for false positives.

Default: LOW

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sqlimatchstatement.html#cfn-wafv2-webacl-sqlimatchstatement-sensitivitylevel

text_transformations

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.

If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-sqlimatchstatement.html#cfn-wafv2-webacl-sqlimatchstatement-texttransformations

StatementProperty

class CfnWebACL.StatementProperty(*, and_statement=None, byte_match_statement=None, geo_match_statement=None, ip_set_reference_statement=None, label_match_statement=None, managed_rule_group_statement=None, not_statement=None, or_statement=None, rate_based_statement=None, regex_match_statement=None, regex_pattern_set_reference_statement=None, rule_group_reference_statement=None, size_constraint_statement=None, sqli_match_statement=None, xss_match_statement=None)

Bases: object

The processing guidance for a rule, used by AWS WAF to determine whether a web request matches the rule.

Parameters:
  • and_statement (Union[IResolvable, AndStatementProperty, Dict[str, Any], None]) – A logical rule statement used to combine other rule statements with AND logic. You provide more than one Statement within the AndStatement .

  • byte_match_statement (Union[IResolvable, ByteMatchStatementProperty, Dict[str, Any], None]) – A rule statement that defines a string match search for AWS WAF to apply to web requests. The byte match statement provides the bytes to search for, the location in requests that you want AWS WAF to search, and other settings. The bytes to search for are typically a string that corresponds with ASCII characters. In the AWS WAF console and the developer guide, this is called a string match statement.

  • geo_match_statement (Union[IResolvable, GeoMatchStatementProperty, Dict[str, Any], None]) –

    A rule statement that labels web requests by country and region and that matches against web requests based on country code. A geo match rule labels every request that it inspects regardless of whether it finds a match. - To manage requests only by country, you can use this statement by itself and specify the countries that you want to match against in the CountryCodes array. - Otherwise, configure your geo match rule with Count action so that it only labels requests. Then, add one or more label match rules to run after the geo match rule and configure them to match against the geographic labels and handle the requests as needed. AWS WAF labels requests using the alpha-2 country and region codes from the International Organization for Standardization (ISO) 3166 standard. AWS WAF determines the codes using either the IP address in the web request origin or, if you specify it, the address in the geo match ForwardedIPConfig . If you use the web request origin, the label formats are awswaf:clientip:geo:region:<ISO country code>-<ISO region code> and awswaf:clientip:geo:country:<ISO country code> . If you use a forwarded IP address, the label formats are awswaf:forwardedip:geo:region:<ISO country code>-<ISO region code> and awswaf:forwardedip:geo:country:<ISO country code> . For additional details, see Geographic match rule statement in the AWS WAF Developer Guide .

  • ip_set_reference_statement (Union[IResolvable, IPSetReferenceStatementProperty, Dict[str, Any], None]) – A rule statement used to detect web requests coming from particular IP addresses or address ranges. To use this, create an IPSet that specifies the addresses you want to detect, then use the ARN of that set in this statement. Each IP set rule statement references an IP set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, AWS WAF automatically updates all rules that reference it.

  • label_match_statement (Union[IResolvable, LabelMatchStatementProperty, Dict[str, Any], None]) – A rule statement to match against labels that have been added to the web request by rules that have already run in the web ACL. The label match statement provides the label or namespace string to search for. The label string can represent a part or all of the fully qualified label name that had been added to the web request. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label. If you do not provide the fully qualified name in your label match string, AWS WAF performs the search for labels that were added in the same context as the label match statement.

  • managed_rule_group_statement (Union[IResolvable, ManagedRuleGroupStatementProperty, Dict[str, Any], None]) – A rule statement used to run the rules that are defined in a managed rule group. To use this, provide the vendor name and the name of the rule group in this statement. You cannot nest a ManagedRuleGroupStatement , for example for use inside a NotStatement or OrStatement . It can only be referenced as a top-level statement within a rule.

  • not_statement (Union[IResolvable, NotStatementProperty, Dict[str, Any], None]) – A logical rule statement used to negate the results of another rule statement. You provide one Statement within the NotStatement .

  • or_statement (Union[IResolvable, OrStatementProperty, Dict[str, Any], None]) – A logical rule statement used to combine other rule statements with OR logic. You provide more than one Statement within the OrStatement .

  • rate_based_statement (Union[IResolvable, RateBasedStatementProperty, Dict[str, Any], None]) – A rate-based rule tracks the rate of requests for each originating IP address, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any 5-minute time span. You can use this to put a temporary block on requests from an IP address that is sending excessive requests. AWS WAF tracks and manages web requests separately for each instance of a rate-based rule that you use. For example, if you provide the same rate-based rule settings in two web ACLs, each of the two rule statements represents a separate instance of the rate-based rule and gets its own tracking and management by AWS WAF . If you define a rate-based rule inside a rule group, and then use that rule group in multiple places, each use creates a separate instance of the rate-based rule that gets its own tracking and management by AWS WAF . When the rule action triggers, AWS WAF blocks additional requests from the IP address until the request rate falls below the limit. You can optionally nest another statement inside the rate-based statement, to narrow the scope of the rule so that it only counts requests that match the nested statement. For example, based on recent requests that you have seen from an attacker, you might create a rate-based rule with a nested AND rule statement that contains the following nested statements: - An IP match statement with an IP set that specifies the address 192.0.2.44. - A string match statement that searches in the User-Agent header for the string BadBot. In this rate-based rule, you also define a rate limit. For this example, the rate limit is 1,000. Requests that meet the criteria of both of the nested statements are counted. If the count exceeds 1,000 requests per five minutes, the rule action triggers. Requests that do not meet the criteria of both of the nested statements are not counted towards the rate limit and are not affected by this rule. You cannot nest a RateBasedStatement inside another statement, for example inside a NotStatement or OrStatement . You can define a RateBasedStatement inside a web ACL and inside a rule group.

  • regex_match_statement (Union[IResolvable, RegexMatchStatementProperty, Dict[str, Any], None]) – A rule statement used to search web request components for a match against a single regular expression.

  • regex_pattern_set_reference_statement (Union[IResolvable, RegexPatternSetReferenceStatementProperty, Dict[str, Any], None]) – A rule statement used to search web request components for matches with regular expressions. To use this, create a RegexPatternSet that specifies the expressions that you want to detect, then use the ARN of that set in this statement. A web request matches the pattern set rule statement if the request component matches any of the patterns in the set. Each regex pattern set rule statement references a regex pattern set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, AWS WAF automatically updates all rules that reference it.

  • rule_group_reference_statement (Union[IResolvable, RuleGroupReferenceStatementProperty, Dict[str, Any], None]) – A rule statement used to run the rules that are defined in a RuleGroup . To use this, create a rule group with your rules, then provide the ARN of the rule group in this statement. You cannot nest a RuleGroupReferenceStatement , for example for use inside a NotStatement or OrStatement . You can only use a rule group reference statement at the top level inside a web ACL.

  • size_constraint_statement (Union[IResolvable, SizeConstraintStatementProperty, Dict[str, Any], None]) – A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<). For example, you can use a size constraint statement to look for query strings that are longer than 100 bytes. If you configure AWS WAF to inspect the request body, AWS WAF inspects only the number of bytes of the body up to the limit for the web ACL. By default, for regional web ACLs, this limit is 8 KB (8,192 kilobytes) and for CloudFront web ACLs, this limit is 16 KB (16,384 kilobytes). For CloudFront web ACLs, you can increase the limit in the web ACL AssociationConfig , for additional fees. If you know that the request body for your web requests should never exceed the inspection limit, you could use a size constraint statement to block requests that have a larger request body size. If you choose URI for the value of Part of the request to filter on, the slash (/) in the URI counts as one character. For example, the URI /logo.jpg is nine characters long.

  • sqli_match_statement (Union[IResolvable, SqliMatchStatementProperty, Dict[str, Any], None]) – A rule statement that inspects for malicious SQL code. Attackers insert malicious SQL code into web requests to do things like modify your database or extract data from it.

  • xss_match_statement (Union[IResolvable, XssMatchStatementProperty, Dict[str, Any], None]) – A rule statement that inspects for cross-site scripting (XSS) attacks. In XSS attacks, the attacker uses vulnerabilities in a benign website as a vehicle to inject malicious client-site scripts into other legitimate web browsers.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.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
# and_statement_property_: wafv2.CfnWebACL.AndStatementProperty
# managed_rule_group_statement_property_: wafv2.CfnWebACL.ManagedRuleGroupStatementProperty
# method: Any
# not_statement_property_: wafv2.CfnWebACL.NotStatementProperty
# or_statement_property_: wafv2.CfnWebACL.OrStatementProperty
# query_string: Any
# rate_based_statement_property_: wafv2.CfnWebACL.RateBasedStatementProperty
# single_header: Any
# single_query_argument: Any
# statement_property_: wafv2.CfnWebACL.StatementProperty
# uri_path: Any

statement_property = wafv2.CfnWebACL.StatementProperty(
    and_statement=wafv2.CfnWebACL.AndStatementProperty(
        statements=[wafv2.CfnWebACL.StatementProperty(
            and_statement=and_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"
                )]
            )
        )]
    ),
    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=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=managed_rule_group_statement_property_,
            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"
                )]
            )
        ),
        version="version"
    ),
    not_statement=wafv2.CfnWebACL.NotStatementProperty(
        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=not_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"
                )]
            )
        )
    ),
    or_statement=wafv2.CfnWebACL.OrStatementProperty(
        statements=[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=or_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"
                )]
            )
        )]
    ),
    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=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=rate_based_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"
                )]
            )
        )
    ),
    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"
        )]
    )
)

Attributes

and_statement

A logical rule statement used to combine other rule statements with AND logic.

You provide more than one Statement within the AndStatement .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-andstatement

byte_match_statement

A rule statement that defines a string match search for AWS WAF to apply to web requests.

The byte match statement provides the bytes to search for, the location in requests that you want AWS WAF to search, and other settings. The bytes to search for are typically a string that corresponds with ASCII characters. In the AWS WAF console and the developer guide, this is called a string match statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-bytematchstatement

geo_match_statement

A rule statement that labels web requests by country and region and that matches against web requests based on country code.

A geo match rule labels every request that it inspects regardless of whether it finds a match.

  • To manage requests only by country, you can use this statement by itself and specify the countries that you want to match against in the CountryCodes array.

  • Otherwise, configure your geo match rule with Count action so that it only labels requests. Then, add one or more label match rules to run after the geo match rule and configure them to match against the geographic labels and handle the requests as needed.

AWS WAF labels requests using the alpha-2 country and region codes from the International Organization for Standardization (ISO) 3166 standard. AWS WAF determines the codes using either the IP address in the web request origin or, if you specify it, the address in the geo match ForwardedIPConfig .

If you use the web request origin, the label formats are awswaf:clientip:geo:region:<ISO country code>-<ISO region code> and awswaf:clientip:geo:country:<ISO country code> .

If you use a forwarded IP address, the label formats are awswaf:forwardedip:geo:region:<ISO country code>-<ISO region code> and awswaf:forwardedip:geo:country:<ISO country code> .

For additional details, see Geographic match rule statement in the AWS WAF Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-geomatchstatement

ip_set_reference_statement

A rule statement used to detect web requests coming from particular IP addresses or address ranges.

To use this, create an IPSet that specifies the addresses you want to detect, then use the ARN of that set in this statement.

Each IP set rule statement references an IP set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, AWS WAF automatically updates all rules that reference it.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-ipsetreferencestatement

label_match_statement

A rule statement to match against labels that have been added to the web request by rules that have already run in the web ACL.

The label match statement provides the label or namespace string to search for. The label string can represent a part or all of the fully qualified label name that had been added to the web request. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label. If you do not provide the fully qualified name in your label match string, AWS WAF performs the search for labels that were added in the same context as the label match statement.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-labelmatchstatement

managed_rule_group_statement

A rule statement used to run the rules that are defined in a managed rule group.

To use this, provide the vendor name and the name of the rule group in this statement.

You cannot nest a ManagedRuleGroupStatement , for example for use inside a NotStatement or OrStatement . It can only be referenced as a top-level statement within a rule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-managedrulegroupstatement

not_statement

A logical rule statement used to negate the results of another rule statement.

You provide one Statement within the NotStatement .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-notstatement

or_statement

A logical rule statement used to combine other rule statements with OR logic.

You provide more than one Statement within the OrStatement .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-orstatement

rate_based_statement

A rate-based rule tracks the rate of requests for each originating IP address, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any 5-minute time span.

You can use this to put a temporary block on requests from an IP address that is sending excessive requests.

AWS WAF tracks and manages web requests separately for each instance of a rate-based rule that you use. For example, if you provide the same rate-based rule settings in two web ACLs, each of the two rule statements represents a separate instance of the rate-based rule and gets its own tracking and management by AWS WAF . If you define a rate-based rule inside a rule group, and then use that rule group in multiple places, each use creates a separate instance of the rate-based rule that gets its own tracking and management by AWS WAF .

When the rule action triggers, AWS WAF blocks additional requests from the IP address until the request rate falls below the limit.

You can optionally nest another statement inside the rate-based statement, to narrow the scope of the rule so that it only counts requests that match the nested statement. For example, based on recent requests that you have seen from an attacker, you might create a rate-based rule with a nested AND rule statement that contains the following nested statements:

  • An IP match statement with an IP set that specifies the address 192.0.2.44.

  • A string match statement that searches in the User-Agent header for the string BadBot.

In this rate-based rule, you also define a rate limit. For this example, the rate limit is 1,000. Requests that meet the criteria of both of the nested statements are counted. If the count exceeds 1,000 requests per five minutes, the rule action triggers. Requests that do not meet the criteria of both of the nested statements are not counted towards the rate limit and are not affected by this rule.

You cannot nest a RateBasedStatement inside another statement, for example inside a NotStatement or OrStatement . You can define a RateBasedStatement inside a web ACL and inside a rule group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-ratebasedstatement

regex_match_statement

A rule statement used to search web request components for a match against a single regular expression.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-regexmatchstatement

regex_pattern_set_reference_statement

A rule statement used to search web request components for matches with regular expressions.

To use this, create a RegexPatternSet that specifies the expressions that you want to detect, then use the ARN of that set in this statement. A web request matches the pattern set rule statement if the request component matches any of the patterns in the set.

Each regex pattern set rule statement references a regex pattern set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, AWS WAF automatically updates all rules that reference it.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-regexpatternsetreferencestatement

rule_group_reference_statement

A rule statement used to run the rules that are defined in a RuleGroup .

To use this, create a rule group with your rules, then provide the ARN of the rule group in this statement.

You cannot nest a RuleGroupReferenceStatement , for example for use inside a NotStatement or OrStatement . You can only use a rule group reference statement at the top level inside a web ACL.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-rulegroupreferencestatement

size_constraint_statement

A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<).

For example, you can use a size constraint statement to look for query strings that are longer than 100 bytes.

If you configure AWS WAF to inspect the request body, AWS WAF inspects only the number of bytes of the body up to the limit for the web ACL. By default, for regional web ACLs, this limit is 8 KB (8,192 kilobytes) and for CloudFront web ACLs, this limit is 16 KB (16,384 kilobytes). For CloudFront web ACLs, you can increase the limit in the web ACL AssociationConfig , for additional fees. If you know that the request body for your web requests should never exceed the inspection limit, you could use a size constraint statement to block requests that have a larger request body size.

If you choose URI for the value of Part of the request to filter on, the slash (/) in the URI counts as one character. For example, the URI /logo.jpg is nine characters long.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-sizeconstraintstatement

sqli_match_statement

A rule statement that inspects for malicious SQL code.

Attackers insert malicious SQL code into web requests to do things like modify your database or extract data from it.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-sqlimatchstatement

xss_match_statement

A rule statement that inspects for cross-site scripting (XSS) attacks.

In XSS attacks, the attacker uses vulnerabilities in a benign website as a vehicle to inject malicious client-site scripts into other legitimate web browsers.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-statement.html#cfn-wafv2-webacl-statement-xssmatchstatement

TextTransformationProperty

class CfnWebACL.TextTransformationProperty(*, priority, type)

Bases: object

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.

Parameters:
  • priority (Union[int, float]) – Sets the relative processing order for multiple transformations. AWS WAF processes all transformations, from lowest priority to highest, before inspecting the transformed content. The priorities don’t need to be consecutive, but they must all be different.

  • type (str) – You can specify the following transformation types:. BASE64_DECODE - Decode a Base64 -encoded string. BASE64_DECODE_EXT - Decode a Base64 -encoded string, but use a forgiving implementation that ignores characters that aren’t valid. CMD_LINE - Command-line transformations. These are helpful in reducing effectiveness of attackers who inject an operating system command-line command and use unusual formatting to disguise some or all of the command. - Delete the following characters: \ " ' ^ - Delete spaces before the following characters: / ( - Replace the following characters with a space: , ; - Replace multiple spaces with one space - Convert uppercase letters (A-Z) to lowercase (a-z) COMPRESS_WHITE_SPACE - Replace these characters with a space character (decimal 32): - \f , formfeed, decimal 12 - \t , tab, decimal 9 - \n , newline, decimal 10 - \r , carriage return, decimal 13 - \v , vertical tab, decimal 11 - Non-breaking space, decimal 160 COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. CSS_DECODE - Decode characters that were encoded using CSS 2.x escape rules syndata.html#characters . This function uses up to two bytes in the decoding process, so it can help to uncover ASCII characters that were encoded using CSS encoding that wouldn’t typically be encoded. It’s also useful in countering evasion, which is a combination of a backslash and non-hexadecimal characters. For example, ja\vascript for javascript. ESCAPE_SEQ_DECODE - Decode the following ANSI C escape sequences: \a , \b , \f , \n , \r , \t , \v , \\ , \? , \' , \" , \xHH (hexadecimal), \0OOO (octal). Encodings that aren’t valid remain in the output. HEX_DECODE - Decode a string of hexadecimal characters into a binary. HTML_ENTITY_DECODE - Replace HTML-encoded characters with unencoded characters. HTML_ENTITY_DECODE performs these operations: - Replaces (ampersand)quot; with " - Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 - Replaces (ampersand)lt; with a “less than” symbol - Replaces (ampersand)gt; with > - Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh; , with the corresponding characters - Replaces characters that are represented in decimal format, (ampersand)#nnnn; , with the corresponding characters JS_DECODE - Decode JavaScript escape sequences. If a \ u HHHH code is in the full-width ASCII code range of FF01-FF5E , then the higher byte is used to detect and adjust the lower byte. If not, only the lower byte is used and the higher byte is zeroed, causing a possible loss of information. LOWERCASE - Convert uppercase letters (A-Z) to lowercase (a-z). MD5 - Calculate an MD5 hash from the data in the input. The computed hash is in a raw binary form. NONE - Specify NONE if you don’t want any text transformations. NORMALIZE_PATH - Remove multiple slashes, directory self-references, and directory back-references that are not at the beginning of the input from an input string. NORMALIZE_PATH_WIN - This is the same as NORMALIZE_PATH , but first converts backslash characters to forward slashes. REMOVE_NULLS - Remove all NULL bytes from the input. REPLACE_COMMENTS - Replace each occurrence of a C-style comment ( /* ... * / ) with a single space. Multiple consecutive occurrences are not compressed. Unterminated comments are also replaced with a space (ASCII 0x20). However, a standalone termination of a comment ( * / ) is not acted upon. REPLACE_NULLS - Replace NULL bytes in the input with space characters (ASCII 0x20 ). SQL_HEX_DECODE - Decode SQL hex data. Example ( 0x414243 ) will be decoded to ( ABC ). URL_DECODE - Decode a URL-encoded value. URL_DECODE_UNI - Like URL_DECODE , but with support for Microsoft-specific %u encoding. If the code is in the full-width ASCII code range of FF01-FF5E , the higher byte is used to detect and adjust the lower byte. Otherwise, only the lower byte is used and the higher byte is zeroed. UTF8_TO_UNICODE - Convert all UTF-8 character sequences to Unicode. This helps input normalization, and minimizing false-positives and false-negatives for non-English languages.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-texttransformation.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

text_transformation_property = wafv2.CfnWebACL.TextTransformationProperty(
    priority=123,
    type="type"
)

Attributes

priority

Sets the relative processing order for multiple transformations.

AWS WAF processes all transformations, from lowest priority to highest, before inspecting the transformed content. The priorities don’t need to be consecutive, but they must all be different.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-texttransformation.html#cfn-wafv2-webacl-texttransformation-priority

type

.

BASE64_DECODE - Decode a Base64 -encoded string.

BASE64_DECODE_EXT - Decode a Base64 -encoded string, but use a forgiving implementation that ignores characters that aren’t valid.

CMD_LINE - Command-line transformations. These are helpful in reducing effectiveness of attackers who inject an operating system command-line command and use unusual formatting to disguise some or all of the command.

  • Delete the following characters: \ " ' ^

  • Delete spaces before the following characters: / (

  • Replace the following characters with a space: , ;

  • Replace multiple spaces with one space

  • Convert uppercase letters (A-Z) to lowercase (a-z)

COMPRESS_WHITE_SPACE - Replace these characters with a space character (decimal 32):

  • \f , formfeed, decimal 12

  • \t , tab, decimal 9

  • \n , newline, decimal 10

  • \r , carriage return, decimal 13

  • \v , vertical tab, decimal 11

  • Non-breaking space, decimal 160

COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.

CSS_DECODE - Decode characters that were encoded using CSS 2.x escape rules syndata.html#characters . This function uses up to two bytes in the decoding process, so it can help to uncover ASCII characters that were encoded using CSS encoding that wouldn’t typically be encoded. It’s also useful in countering evasion, which is a combination of a backslash and non-hexadecimal characters. For example, ja\vascript for javascript.

ESCAPE_SEQ_DECODE - Decode the following ANSI C escape sequences: \a , \b , \f , \n , \r , \t , \v , \\ , \? , \' , \" , \xHH (hexadecimal), \0OOO (octal). Encodings that aren’t valid remain in the output.

HEX_DECODE - Decode a string of hexadecimal characters into a binary.

HTML_ENTITY_DECODE - Replace HTML-encoded characters with unencoded characters. HTML_ENTITY_DECODE performs these operations:

  • Replaces (ampersand)quot; with "

  • Replaces (ampersand)nbsp; with a non-breaking space, decimal 160

  • Replaces (ampersand)lt; with a “less than” symbol

  • Replaces (ampersand)gt; with >

  • Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh; , with the corresponding characters

  • Replaces characters that are represented in decimal format, (ampersand)#nnnn; , with the corresponding characters

JS_DECODE - Decode JavaScript escape sequences. If a \ u HHHH code is in the full-width ASCII code range of FF01-FF5E , then the higher byte is used to detect and adjust the lower byte. If not, only the lower byte is used and the higher byte is zeroed, causing a possible loss of information.

LOWERCASE - Convert uppercase letters (A-Z) to lowercase (a-z).

MD5 - Calculate an MD5 hash from the data in the input. The computed hash is in a raw binary form.

NONE - Specify NONE if you don’t want any text transformations.

NORMALIZE_PATH - Remove multiple slashes, directory self-references, and directory back-references that are not at the beginning of the input from an input string.

NORMALIZE_PATH_WIN - This is the same as NORMALIZE_PATH , but first converts backslash characters to forward slashes.

REMOVE_NULLS - Remove all NULL bytes from the input.

REPLACE_COMMENTS - Replace each occurrence of a C-style comment ( /* ... * / ) with a single space. Multiple consecutive occurrences are not compressed. Unterminated comments are also replaced with a space (ASCII 0x20). However, a standalone termination of a comment ( * / ) is not acted upon.

REPLACE_NULLS - Replace NULL bytes in the input with space characters (ASCII 0x20 ).

SQL_HEX_DECODE - Decode SQL hex data. Example ( 0x414243 ) will be decoded to ( ABC ).

URL_DECODE - Decode a URL-encoded value.

URL_DECODE_UNI - Like URL_DECODE , but with support for Microsoft-specific %u encoding. If the code is in the full-width ASCII code range of FF01-FF5E , the higher byte is used to detect and adjust the lower byte. Otherwise, only the lower byte is used and the higher byte is zeroed.

UTF8_TO_UNICODE - Convert all UTF-8 character sequences to Unicode. This helps input normalization, and minimizing false-positives and false-negatives for non-English languages.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-texttransformation.html#cfn-wafv2-webacl-texttransformation-type

Type:

You can specify the following transformation types

VisibilityConfigProperty

class CfnWebACL.VisibilityConfigProperty(*, cloud_watch_metrics_enabled, metric_name, sampled_requests_enabled)

Bases: object

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

Parameters:
  • cloud_watch_metrics_enabled (Union[bool, IResolvable]) – Indicates whether the associated resource sends metrics to Amazon CloudWatch. For the list of available metrics, see AWS WAF Metrics in the AWS WAF Developer Guide . For web ACLs, the metrics are for web requests that have the web ACL default action applied. AWS WAF applies the default action to web requests that pass the inspection of all rules in the web ACL without being either allowed or blocked. For more information, see The web ACL default action in the AWS WAF Developer Guide .

  • metric_name (str) – A name of the Amazon CloudWatch metric dimension. The name can contain only the characters: A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 characters long. It can’t contain whitespace or metric names that are reserved for AWS WAF , for example All and Default_Action .

  • sampled_requests_enabled (Union[bool, IResolvable]) – Indicates whether AWS WAF should store a sampling of the web requests that match the rules. You can view the sampled requests through the AWS WAF console.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-visibilityconfig.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

visibility_config_property = wafv2.CfnWebACL.VisibilityConfigProperty(
    cloud_watch_metrics_enabled=False,
    metric_name="metricName",
    sampled_requests_enabled=False
)

Attributes

cloud_watch_metrics_enabled

Indicates whether the associated resource sends metrics to Amazon CloudWatch.

For the list of available metrics, see AWS WAF Metrics in the AWS WAF Developer Guide .

For web ACLs, the metrics are for web requests that have the web ACL default action applied. AWS WAF applies the default action to web requests that pass the inspection of all rules in the web ACL without being either allowed or blocked. For more information, see The web ACL default action in the AWS WAF Developer Guide .

Link:

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

metric_name

A name of the Amazon CloudWatch metric dimension.

The name can contain only the characters: A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 characters long. It can’t contain whitespace or metric names that are reserved for AWS WAF , for example All and Default_Action .

Link:

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

sampled_requests_enabled

Indicates whether AWS WAF should store a sampling of the web requests that match the rules.

You can view the sampled requests through the AWS WAF console.

Link:

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

XssMatchStatementProperty

class CfnWebACL.XssMatchStatementProperty(*, field_to_match, text_transformations)

Bases: object

A rule statement that inspects for cross-site scripting (XSS) attacks.

In XSS attacks, the attacker uses vulnerabilities in a benign website as a vehicle to inject malicious client-site scripts into other legitimate web browsers.

Parameters:
  • field_to_match (Union[IResolvable, FieldToMatchProperty, Dict[str, Any]]) – The part of the web request that you want AWS WAF to inspect.

  • text_transformations (Union[IResolvable, Sequence[Union[IResolvable, TextTransformationProperty, Dict[str, Any]]]]) – Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-xssmatchstatement.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
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# uri_path: Any

xss_match_statement_property = 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"
    )]
)

Attributes

field_to_match

The part of the web request that you want AWS WAF to inspect.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-xssmatchstatement.html#cfn-wafv2-webacl-xssmatchstatement-fieldtomatch

text_transformations

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.

If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-xssmatchstatement.html#cfn-wafv2-webacl-xssmatchstatement-texttransformations