AWS WAFV2

2022/10/27 - AWS WAFV2 - 13 updated api methods

Changes  This release adds the following: Challenge rule action, to silently verify client browsers; rule group rule action override to any valid rule action, not just Count; token sharing between protected applications for challenge/CAPTCHA token; targeted rules option for Bot Control managed rule group.

CheckCapacity (updated) Link ¶
Changes (request)
{'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                 'Value': 'string'}]}}},
           'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
           'Statement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                           '| '
                                                                                                                                           'TARGETED'}},
                                                       'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}},
                                                                                                'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                             'ResponseCode': 'integer',
                                                                                                                             'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                  'Value': 'string'}]}},
                                                                                                'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}}},
                                                                                'Name': 'string'}]},
                         'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                  'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                               'ResponseCode': 'integer',
                                                                                                                               'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                    'Value': 'string'}]}},
                                                                                                  'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                  'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                             'Value': 'string'}]}},
                                                                                                  'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}}},
                                                                                  'Name': 'string'}]}}}}

Returns the web ACL capacity unit (WCU) requirements for a specified scope and set of rules. You can use this to check the capacity requirements for the rules you want to use in a RuleGroup or WebACL.

WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. 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.

See also: AWS API Documentation

Request Syntax

client.check_capacity(
    Scope='CLOUDFRONT'|'REGIONAL',
    Rules=[
        {
            'Name': 'string',
            'Priority': 123,
            'Statement': {
                'ByteMatchStatement': {
                    'SearchString': b'bytes',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'PositionalConstraint': 'EXACTLY'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CONTAINS_WORD'
                },
                'SqliMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'SensitivityLevel': 'LOW'|'HIGH'
                },
                'XssMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'SizeConstraintStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'ComparisonOperator': 'EQ'|'NE'|'LE'|'LT'|'GE'|'GT',
                    'Size': 123,
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'GeoMatchStatement': {
                    'CountryCodes': [
                        'AF'|'AX'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BQ'|'BA'|'BW'|'BV'|'BR'|'IO'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CG'|'CD'|'CK'|'CR'|'CI'|'HR'|'CU'|'CW'|'CY'|'CZ'|'DK'|'DJ'|'DM'|'DO'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'GF'|'PF'|'TF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GP'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HM'|'VA'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KP'|'KR'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MQ'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'NF'|'MP'|'NO'|'OM'|'PK'|'PW'|'PS'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'GS'|'SS'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TL'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'UG'|'UA'|'AE'|'GB'|'US'|'UM'|'UY'|'UZ'|'VU'|'VE'|'VN'|'VG'|'VI'|'WF'|'EH'|'YE'|'ZM'|'ZW'|'XK',
                    ],
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'RuleGroupReferenceStatement': {
                    'ARN': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'IPSetReferenceStatement': {
                    'ARN': 'string',
                    'IPSetForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH',
                        'Position': 'FIRST'|'LAST'|'ANY'
                    }
                },
                'RegexPatternSetReferenceStatement': {
                    'ARN': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'RateBasedStatement': {
                    'Limit': 123,
                    'AggregateKeyType': 'IP'|'FORWARDED_IP',
                    'ScopeDownStatement': {'... recursive ...'},
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'AndStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'OrStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'NotStatement': {
                    'Statement': {'... recursive ...'}
                },
                'ManagedRuleGroupStatement': {
                    'VendorName': 'string',
                    'Name': 'string',
                    'Version': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'ScopeDownStatement': {'... recursive ...'},
                    'ManagedRuleGroupConfigs': [
                        {
                            'LoginPath': 'string',
                            'PayloadType': 'JSON'|'FORM_ENCODED',
                            'UsernameField': {
                                'Identifier': 'string'
                            },
                            'PasswordField': {
                                'Identifier': 'string'
                            },
                            'AWSManagedRulesBotControlRuleSet': {
                                'InspectionLevel': 'COMMON'|'TARGETED'
                            }
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'LabelMatchStatement': {
                    'Scope': 'LABEL'|'NAMESPACE',
                    'Key': 'string'
                },
                'RegexMatchStatement': {
                    'RegexString': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                }
            },
            'Action': {
                'Block': {
                    'CustomResponse': {
                        'ResponseCode': 123,
                        'CustomResponseBodyKey': 'string',
                        'ResponseHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Allow': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Captcha': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Challenge': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                }
            },
            'OverrideAction': {
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'None': {}

            },
            'RuleLabels': [
                {
                    'Name': 'string'
                },
            ],
            'VisibilityConfig': {
                'SampledRequestsEnabled': True|False,
                'CloudWatchMetricsEnabled': True|False,
                'MetricName': 'string'
            },
            'CaptchaConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            },
            'ChallengeConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            }
        },
    ]
)


  **Parameters**
  ::

      # This section is too large to render.
      # Please see the AWS API Documentation linked below.

  `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CheckCapacity>`_
rtype:

dict

returns:

Response Syntax

{
    'Capacity': 123
}

Response Structure

  • (dict) --

    • Capacity (integer) --

      The capacity required by the rules and scope.

CreateRuleGroup (updated) Link ¶
Changes (request)
{'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                 'Value': 'string'}]}}},
           'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
           'Statement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                           '| '
                                                                                                                                           'TARGETED'}},
                                                       'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}},
                                                                                                'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                             'ResponseCode': 'integer',
                                                                                                                             'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                  'Value': 'string'}]}},
                                                                                                'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}}},
                                                                                'Name': 'string'}]},
                         'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                  'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                               'ResponseCode': 'integer',
                                                                                                                               'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                    'Value': 'string'}]}},
                                                                                                  'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                  'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                             'Value': 'string'}]}},
                                                                                                  'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}}},
                                                                                  'Name': 'string'}]}}}}

Creates a RuleGroup per the specifications provided.

A rule group defines a collection of rules to inspect and control web requests that you can use in a WebACL. When you create a rule group, you define an immutable capacity limit. If you update a rule group, you must stay within the capacity. This allows others to reuse the rule group with confidence in its capacity requirements.

See also: AWS API Documentation

Request Syntax

client.create_rule_group(
    Name='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    Capacity=123,
    Description='string',
    Rules=[
        {
            'Name': 'string',
            'Priority': 123,
            'Statement': {
                'ByteMatchStatement': {
                    'SearchString': b'bytes',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'PositionalConstraint': 'EXACTLY'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CONTAINS_WORD'
                },
                'SqliMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'SensitivityLevel': 'LOW'|'HIGH'
                },
                'XssMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'SizeConstraintStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'ComparisonOperator': 'EQ'|'NE'|'LE'|'LT'|'GE'|'GT',
                    'Size': 123,
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'GeoMatchStatement': {
                    'CountryCodes': [
                        'AF'|'AX'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BQ'|'BA'|'BW'|'BV'|'BR'|'IO'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CG'|'CD'|'CK'|'CR'|'CI'|'HR'|'CU'|'CW'|'CY'|'CZ'|'DK'|'DJ'|'DM'|'DO'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'GF'|'PF'|'TF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GP'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HM'|'VA'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KP'|'KR'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MQ'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'NF'|'MP'|'NO'|'OM'|'PK'|'PW'|'PS'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'GS'|'SS'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TL'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'UG'|'UA'|'AE'|'GB'|'US'|'UM'|'UY'|'UZ'|'VU'|'VE'|'VN'|'VG'|'VI'|'WF'|'EH'|'YE'|'ZM'|'ZW'|'XK',
                    ],
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'RuleGroupReferenceStatement': {
                    'ARN': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'IPSetReferenceStatement': {
                    'ARN': 'string',
                    'IPSetForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH',
                        'Position': 'FIRST'|'LAST'|'ANY'
                    }
                },
                'RegexPatternSetReferenceStatement': {
                    'ARN': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'RateBasedStatement': {
                    'Limit': 123,
                    'AggregateKeyType': 'IP'|'FORWARDED_IP',
                    'ScopeDownStatement': {'... recursive ...'},
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'AndStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'OrStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'NotStatement': {
                    'Statement': {'... recursive ...'}
                },
                'ManagedRuleGroupStatement': {
                    'VendorName': 'string',
                    'Name': 'string',
                    'Version': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'ScopeDownStatement': {'... recursive ...'},
                    'ManagedRuleGroupConfigs': [
                        {
                            'LoginPath': 'string',
                            'PayloadType': 'JSON'|'FORM_ENCODED',
                            'UsernameField': {
                                'Identifier': 'string'
                            },
                            'PasswordField': {
                                'Identifier': 'string'
                            },
                            'AWSManagedRulesBotControlRuleSet': {
                                'InspectionLevel': 'COMMON'|'TARGETED'
                            }
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'LabelMatchStatement': {
                    'Scope': 'LABEL'|'NAMESPACE',
                    'Key': 'string'
                },
                'RegexMatchStatement': {
                    'RegexString': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                }
            },
            'Action': {
                'Block': {
                    'CustomResponse': {
                        'ResponseCode': 123,
                        'CustomResponseBodyKey': 'string',
                        'ResponseHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Allow': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Captcha': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Challenge': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                }
            },
            'OverrideAction': {
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'None': {}

            },
            'RuleLabels': [
                {
                    'Name': 'string'
                },
            ],
            'VisibilityConfig': {
                'SampledRequestsEnabled': True|False,
                'CloudWatchMetricsEnabled': True|False,
                'MetricName': 'string'
            },
            'CaptchaConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            },
            'ChallengeConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            }
        },
    ],
    VisibilityConfig={
        'SampledRequestsEnabled': True|False,
        'CloudWatchMetricsEnabled': True|False,
        'MetricName': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    CustomResponseBodies={
        'string': {
            'ContentType': 'TEXT_PLAIN'|'TEXT_HTML'|'APPLICATION_JSON',
            'Content': 'string'
        }
    }
)


  **Parameters**
  ::

      # This section is too large to render.
      # Please see the AWS API Documentation linked below.

  `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup>`_
rtype:

dict

returns:

Response Syntax

{
    'Summary': {
        'Name': 'string',
        'Id': 'string',
        'Description': 'string',
        'LockToken': 'string',
        'ARN': 'string'
    }
}

Response Structure

  • (dict) --

    • Summary (dict) --

      High-level information about a RuleGroup, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule.

      • Name (string) --

        The name of the data type instance. You cannot change the name after you create the instance.

      • Id (string) --

        A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.

      • Description (string) --

        A description of the rule group that helps with identification.

      • LockToken (string) --

        A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

      • ARN (string) --

        The Amazon Resource Name (ARN) of the entity.

CreateWebACL (updated) Link ¶
Changes (request)
{'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
 'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                 'Value': 'string'}]}}},
           'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
           'Statement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                           '| '
                                                                                                                                           'TARGETED'}},
                                                       'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}},
                                                                                                'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                             'ResponseCode': 'integer',
                                                                                                                             'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                  'Value': 'string'}]}},
                                                                                                'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}}},
                                                                                'Name': 'string'}]},
                         'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                  'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                               'ResponseCode': 'integer',
                                                                                                                               'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                    'Value': 'string'}]}},
                                                                                                  'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                  'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                             'Value': 'string'}]}},
                                                                                                  'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}}},
                                                                                  'Name': 'string'}]}}},
 'TokenDomains': ['string']}

Creates a WebACL per the specifications provided.

A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has an action defined (allow, block, or count) for requests that match the statement of the rule. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types Rule, RuleGroup, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resources can be an Amazon CloudFront distribution, an Amazon API Gateway REST API, an Application Load Balancer, an AppSync GraphQL API, or an Amazon Cognito user pool.

See also: AWS API Documentation

Request Syntax

client.create_web_acl(
    Name='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    DefaultAction={
        'Block': {
            'CustomResponse': {
                'ResponseCode': 123,
                'CustomResponseBodyKey': 'string',
                'ResponseHeaders': [
                    {
                        'Name': 'string',
                        'Value': 'string'
                    },
                ]
            }
        },
        'Allow': {
            'CustomRequestHandling': {
                'InsertHeaders': [
                    {
                        'Name': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
    },
    Description='string',
    Rules=[
        {
            'Name': 'string',
            'Priority': 123,
            'Statement': {
                'ByteMatchStatement': {
                    'SearchString': b'bytes',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'PositionalConstraint': 'EXACTLY'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CONTAINS_WORD'
                },
                'SqliMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'SensitivityLevel': 'LOW'|'HIGH'
                },
                'XssMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'SizeConstraintStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'ComparisonOperator': 'EQ'|'NE'|'LE'|'LT'|'GE'|'GT',
                    'Size': 123,
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'GeoMatchStatement': {
                    'CountryCodes': [
                        'AF'|'AX'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BQ'|'BA'|'BW'|'BV'|'BR'|'IO'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CG'|'CD'|'CK'|'CR'|'CI'|'HR'|'CU'|'CW'|'CY'|'CZ'|'DK'|'DJ'|'DM'|'DO'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'GF'|'PF'|'TF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GP'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HM'|'VA'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KP'|'KR'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MQ'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'NF'|'MP'|'NO'|'OM'|'PK'|'PW'|'PS'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'GS'|'SS'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TL'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'UG'|'UA'|'AE'|'GB'|'US'|'UM'|'UY'|'UZ'|'VU'|'VE'|'VN'|'VG'|'VI'|'WF'|'EH'|'YE'|'ZM'|'ZW'|'XK',
                    ],
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'RuleGroupReferenceStatement': {
                    'ARN': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'IPSetReferenceStatement': {
                    'ARN': 'string',
                    'IPSetForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH',
                        'Position': 'FIRST'|'LAST'|'ANY'
                    }
                },
                'RegexPatternSetReferenceStatement': {
                    'ARN': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'RateBasedStatement': {
                    'Limit': 123,
                    'AggregateKeyType': 'IP'|'FORWARDED_IP',
                    'ScopeDownStatement': {'... recursive ...'},
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'AndStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'OrStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'NotStatement': {
                    'Statement': {'... recursive ...'}
                },
                'ManagedRuleGroupStatement': {
                    'VendorName': 'string',
                    'Name': 'string',
                    'Version': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'ScopeDownStatement': {'... recursive ...'},
                    'ManagedRuleGroupConfigs': [
                        {
                            'LoginPath': 'string',
                            'PayloadType': 'JSON'|'FORM_ENCODED',
                            'UsernameField': {
                                'Identifier': 'string'
                            },
                            'PasswordField': {
                                'Identifier': 'string'
                            },
                            'AWSManagedRulesBotControlRuleSet': {
                                'InspectionLevel': 'COMMON'|'TARGETED'
                            }
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'LabelMatchStatement': {
                    'Scope': 'LABEL'|'NAMESPACE',
                    'Key': 'string'
                },
                'RegexMatchStatement': {
                    'RegexString': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                }
            },
            'Action': {
                'Block': {
                    'CustomResponse': {
                        'ResponseCode': 123,
                        'CustomResponseBodyKey': 'string',
                        'ResponseHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Allow': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Captcha': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Challenge': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                }
            },
            'OverrideAction': {
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'None': {}

            },
            'RuleLabels': [
                {
                    'Name': 'string'
                },
            ],
            'VisibilityConfig': {
                'SampledRequestsEnabled': True|False,
                'CloudWatchMetricsEnabled': True|False,
                'MetricName': 'string'
            },
            'CaptchaConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            },
            'ChallengeConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            }
        },
    ],
    VisibilityConfig={
        'SampledRequestsEnabled': True|False,
        'CloudWatchMetricsEnabled': True|False,
        'MetricName': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    CustomResponseBodies={
        'string': {
            'ContentType': 'TEXT_PLAIN'|'TEXT_HTML'|'APPLICATION_JSON',
            'Content': 'string'
        }
    },
    CaptchaConfig={
        'ImmunityTimeProperty': {
            'ImmunityTime': 123
        }
    },
    ChallengeConfig={
        'ImmunityTimeProperty': {
            'ImmunityTime': 123
        }
    },
    TokenDomains=[
        'string',
    ]
)


  **Parameters**
  ::

      # This section is too large to render.
      # Please see the AWS API Documentation linked below.

  `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL>`_
rtype:

dict

returns:

Response Syntax

{
    'Summary': {
        'Name': 'string',
        'Id': 'string',
        'Description': 'string',
        'LockToken': 'string',
        'ARN': 'string'
    }
}

Response Structure

  • (dict) --

    • Summary (dict) --

      High-level information about a WebACL, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a WebACL, and the ARN, that you provide to operations like AssociateWebACL.

      • Name (string) --

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

      • Id (string) --

        The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.

      • Description (string) --

        A description of the web ACL that helps with identification.

      • LockToken (string) --

        A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

      • ARN (string) --

        The Amazon Resource Name (ARN) of the entity.

DescribeManagedRuleGroup (updated) Link ¶
Changes (response)
{'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                 'Value': 'string'}]}}}}}

Provides high-level information for a managed rule group, including descriptions of the rules.

See also: AWS API Documentation

Request Syntax

client.describe_managed_rule_group(
    VendorName='string',
    Name='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    VersionName='string'
)
type VendorName:

string

param VendorName:

[REQUIRED]

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

type Name:

string

param Name:

[REQUIRED]

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

type Scope:

string

param Scope:

[REQUIRED]

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 AppSync GraphQL API, or an Amazon Cognito user pool.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.

  • API and SDKs - For all calls, use the Region endpoint us-east-1.

type VersionName:

string

param VersionName:

The version of the rule group. You can only use a version that is not scheduled for expiration. If you don't provide this, WAF uses the vendor's default version.

rtype:

dict

returns:

Response Syntax

{
    'VersionName': 'string',
    'SnsTopicArn': 'string',
    'Capacity': 123,
    'Rules': [
        {
            'Name': 'string',
            'Action': {
                'Block': {
                    'CustomResponse': {
                        'ResponseCode': 123,
                        'CustomResponseBodyKey': 'string',
                        'ResponseHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Allow': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Captcha': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Challenge': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                }
            }
        },
    ],
    'LabelNamespace': 'string',
    'AvailableLabels': [
        {
            'Name': 'string'
        },
    ],
    'ConsumedLabels': [
        {
            'Name': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • VersionName (string) --

      The managed rule group's version.

    • SnsTopicArn (string) --

      The Amazon resource name (ARN) of the Amazon Simple Notification Service SNS topic that's used to record changes to the managed rule group. You can subscribe to the SNS topic to receive notifications when the managed rule group is modified, such as for new versions and for version expiration. For more information, see the Amazon Simple Notification Service Developer Guide.

    • Capacity (integer) --

      The web ACL capacity units (WCUs) required for this rule group. WAF uses web ACL capacity units (WCU) to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect each rule's relative cost. Rule group capacity is fixed at creation, so users can plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.

    • Rules (list) --

      • (dict) --

        High-level information about a Rule, returned by operations like DescribeManagedRuleGroup. This provides information like the ID, that you can use to retrieve and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule.

        • Name (string) --

          The name of the rule.

        • Action (dict) --

          The action that 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.

          • Block (dict) --

            Instructs WAF to block the web request.

            • CustomResponse (dict) --

              Defines a custom response for the web request.

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

              • ResponseCode (integer) --

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

              • CustomResponseBodyKey (string) --

                References the response body that you want 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.

              • ResponseHeaders (list) --

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

                • (dict) --

                  A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling.

                  • Name (string) --

                    The name of the custom header.

                    For custom request header insertion, when 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, WAF inserts the header x-amzn-waf-sample.

                  • Value (string) --

                    The value of the custom header.

          • Allow (dict) --

            Instructs WAF to allow the web request.

            • CustomRequestHandling (dict) --

              Defines custom handling for the web request.

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

              • InsertHeaders (list) --

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

                • (dict) --

                  A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling.

                  • Name (string) --

                    The name of the custom header.

                    For custom request header insertion, when 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, WAF inserts the header x-amzn-waf-sample.

                  • Value (string) --

                    The value of the custom header.

          • Count (dict) --

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

            • CustomRequestHandling (dict) --

              Defines custom handling for the web request.

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

              • InsertHeaders (list) --

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

                • (dict) --

                  A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling.

                  • Name (string) --

                    The name of the custom header.

                    For custom request header insertion, when 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, WAF inserts the header x-amzn-waf-sample.

                  • Value (string) --

                    The value of the custom header.

          • Captcha (dict) --

            Instructs WAF to run a CAPTCHA check against the web request.

            • CustomRequestHandling (dict) --

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

              • InsertHeaders (list) --

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

                • (dict) --

                  A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling.

                  • Name (string) --

                    The name of the custom header.

                    For custom request header insertion, when 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, WAF inserts the header x-amzn-waf-sample.

                  • Value (string) --

                    The value of the custom header.

          • Challenge (dict) --

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

            • CustomRequestHandling (dict) --

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

              • InsertHeaders (list) --

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

                • (dict) --

                  A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling.

                  • Name (string) --

                    The name of the custom header.

                    For custom request header insertion, when 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, WAF inserts the header x-amzn-waf-sample.

                  • Value (string) --

                    The value of the custom header.

    • LabelNamespace (string) --

      The label namespace prefix for this rule group. All labels added by rules in this rule group have this prefix.

      • The syntax for the label namespace prefix for a managed rule group is the following: awswaf:managed:<vendor>:<rule group name>:

      • When a rule with a label matches a web request, 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: <label namespace>:<label from rule>

    • AvailableLabels (list) --

      The labels that one or more rules in this rule group add to matching web requests. These labels are defined in the RuleLabels for a Rule.

      • (dict) --

        List of labels used by one or more of the rules of a RuleGroup. This summary object is used for the following rule group lists:

        • AvailableLabels - Labels that rules add to matching requests. These labels are defined in the RuleLabels for a Rule.

        • ConsumedLabels - Labels that rules match against. These labels are defined in a LabelMatchStatement specification, in the Statement definition of a rule.

        • Name (string) --

          An individual label specification.

    • ConsumedLabels (list) --

      The labels that one or more rules in this rule group match against in label match statements. These labels are defined in a LabelMatchStatement specification, in the Statement definition of a rule.

      • (dict) --

        List of labels used by one or more of the rules of a RuleGroup. This summary object is used for the following rule group lists:

        • AvailableLabels - Labels that rules add to matching requests. These labels are defined in the RuleLabels for a Rule.

        • ConsumedLabels - Labels that rules match against. These labels are defined in a LabelMatchStatement specification, in the Statement definition of a rule.

        • Name (string) --

          An individual label specification.

GetLoggingConfiguration (updated) Link ¶
Changes (response)
{'LoggingConfiguration': {'LoggingFilter': {'Filters': {'Conditions': {'ActionCondition': {'Action': {'CHALLENGE'}}}}}}}

Returns the LoggingConfiguration for the specified web ACL.

See also: AWS API Documentation

Request Syntax

client.get_logging_configuration(
    ResourceArn='string'
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.

rtype:

dict

returns:

Response Syntax

{
    'LoggingConfiguration': {
        'ResourceArn': 'string',
        'LogDestinationConfigs': [
            'string',
        ],
        'RedactedFields': [
            {
                'SingleHeader': {
                    'Name': 'string'
                },
                'SingleQueryArgument': {
                    'Name': 'string'
                },
                'AllQueryArguments': {},
                'UriPath': {},
                'QueryString': {},
                'Body': {
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Method': {},
                'JsonBody': {
                    'MatchPattern': {
                        'All': {},
                        'IncludedPaths': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Headers': {
                    'MatchPattern': {
                        'All': {},
                        'IncludedHeaders': [
                            'string',
                        ],
                        'ExcludedHeaders': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Cookies': {
                    'MatchPattern': {
                        'All': {},
                        'IncludedCookies': [
                            'string',
                        ],
                        'ExcludedCookies': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                }
            },
        ],
        'ManagedByFirewallManager': True|False,
        'LoggingFilter': {
            'Filters': [
                {
                    'Behavior': 'KEEP'|'DROP',
                    'Requirement': 'MEETS_ALL'|'MEETS_ANY',
                    'Conditions': [
                        {
                            'ActionCondition': {
                                'Action': 'ALLOW'|'BLOCK'|'COUNT'|'CAPTCHA'|'CHALLENGE'|'EXCLUDED_AS_COUNT'
                            },
                            'LabelNameCondition': {
                                'LabelName': 'string'
                            }
                        },
                    ]
                },
            ],
            'DefaultBehavior': 'KEEP'|'DROP'
        }
    }
}

Response Structure

  • (dict) --

    • LoggingConfiguration (dict) --

      The LoggingConfiguration for the specified web ACL.

      • ResourceArn (string) --

        The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs.

      • LogDestinationConfigs (list) --

        The logging destination configuration that you want to associate with the web ACL.

        • (string) --

      • RedactedFields (list) --

        The parts of the request that you want to keep out of the logs. For example, if you redact the SingleHeader field, the HEADER field in the logs will be xxx.

        • (dict) --

          The part of the web request that you want 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" } }

          • SingleHeader (dict) --

            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.

            • Name (string) --

              The name of the query header to inspect.

          • SingleQueryArgument (dict) --

            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" }

            • Name (string) --

              The name of the query argument to inspect.

          • AllQueryArguments (dict) --

            Inspect all query arguments.

          • UriPath (dict) --

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

          • QueryString (dict) --

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

          • Body (dict) --

            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.

            Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the Body object configuration.

            • OversizeHandling (string) --

              What WAF should do if the body is larger than WAF can inspect. WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.

              The options for oversize handling are the following:

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

              • MATCH - Treat the web request as matching the rule statement. 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 8 KB.

              Default: CONTINUE

          • Method (dict) --

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

          • JsonBody (dict) --

            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.

            Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the JsonBody object configuration.

            • MatchPattern (dict) --

              The patterns to look for in the JSON body. WAF inspects the results of these pattern matches against the rule inspection criteria.

              • All (dict) --

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

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

              • IncludedPaths (list) --

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

                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.

                • (string) --

            • MatchScope (string) --

              The parts of the JSON to match against using the MatchPattern. If you specify All, WAF matches against keys and values.

            • InvalidFallbackBehavior (string) --

              What 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. 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. 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, WAF parses and evaluates the content only up to the first parsing failure that it encounters.

              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.

              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"}

            • OversizeHandling (string) --

              What WAF should do if the body is larger than WAF can inspect. WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.

              The options for oversize handling are the following:

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

              • MATCH - Treat the web request as matching the rule statement. 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 8 KB.

              Default: CONTINUE

          • Headers (dict) --

            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 WAF inspects.

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

            • MatchPattern (dict) --

              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"} }

              • All (dict) --

                Inspect all headers.

              • IncludedHeaders (list) --

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

                • (string) --

              • ExcludedHeaders (list) --

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

                • (string) --

            • MatchScope (string) --

              The parts of the headers to match with the rule inspection criteria. If you specify All, WAF inspects both keys and values.

            • OversizeHandling (string) --

              What WAF should do if the headers of the request are larger than WAF can inspect. 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 WAF.

              The options for oversize handling are the following:

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

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

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

          • Cookies (dict) --

            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 WAF inspects.

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

            • MatchPattern (dict) --

              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"} }

              • All (dict) --

                Inspect all cookies.

              • IncludedCookies (list) --

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

                • (string) --

              • ExcludedCookies (list) --

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

                • (string) --

            • MatchScope (string) --

              The parts of the cookies to inspect with the rule inspection criteria. If you specify All, WAF inspects both keys and values.

            • OversizeHandling (string) --

              What WAF should do if the cookies of the request are larger than WAF can inspect. 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 WAF.

              The options for oversize handling are the following:

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

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

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

      • ManagedByFirewallManager (boolean) --

        Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.

      • LoggingFilter (dict) --

        Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.

        • Filters (list) --

          The filters that you want to apply to the logs.

          • (dict) --

            A single logging filter, used in LoggingFilter.

            • Behavior (string) --

              How to handle logs that satisfy the filter's conditions and requirement.

            • Requirement (string) --

              Logic to apply to the filtering conditions. You can specify that, in order to satisfy the filter, a log must match all conditions or must match at least one condition.

            • Conditions (list) --

              Match conditions for the filter.

              • (dict) --

                A single match condition for a Filter.

                • ActionCondition (dict) --

                  A single action condition. This is the action setting that a log record must contain in order to meet the condition.

                  • Action (string) --

                    The action setting that a log record must contain in order to meet the condition. This is the action that WAF applied to the web request.

                    For rule groups, this is either the configured rule action setting, or if you've applied a rule action override to the rule, it's the override action. The value EXCLUDED_AS_COUNT matches on excluded rules and also on rules that have a rule action override of Count.

                • LabelNameCondition (dict) --

                  A single label name condition. This is the fully qualified label name that a log record must contain in order to meet the condition. 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.

                  • LabelName (string) --

                    The label name that a log record must contain in order to meet the condition. This must be a fully qualified label name. 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.

        • DefaultBehavior (string) --

          Default handling for logs that don't match any of the specified filtering conditions.

GetRuleGroup (updated) Link ¶
Changes (response)
{'RuleGroup': {'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                               'Value': 'string'}]}}},
                         'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
                         'Statement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                                         '| '
                                                                                                                                                         'TARGETED'}},
                                                                     'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                     'Value': 'string'}]}},
                                                                                                              'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                           'ResponseCode': 'integer',
                                                                                                                                           'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                'Value': 'string'}]}},
                                                                                                              'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                       'Value': 'string'}]}},
                                                                                                              'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                         'Value': 'string'}]}},
                                                                                                              'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                     'Value': 'string'}]}}},
                                                                                              'Name': 'string'}]},
                                       'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                       'Value': 'string'}]}},
                                                                                                                'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                             'ResponseCode': 'integer',
                                                                                                                                             'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                                'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                         'Value': 'string'}]}},
                                                                                                                'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                           'Value': 'string'}]}},
                                                                                                                'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                       'Value': 'string'}]}}},
                                                                                                'Name': 'string'}]}}}}}

Retrieves the specified RuleGroup.

See also: AWS API Documentation

Request Syntax

client.get_rule_group(
    Name='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    Id='string',
    ARN='string'
)
type Name:

string

param Name:

The name of the rule group. You cannot change the name of a rule group after you create it.

type Scope:

string

param 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 AppSync GraphQL API, or an Amazon Cognito user pool.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.

  • API and SDKs - For all calls, use the Region endpoint us-east-1.

type Id:

string

param Id:

A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.

type ARN:

string

param ARN:

The Amazon Resource Name (ARN) of the entity.

rtype:

dict

returns:

Response Syntax

{
    'RuleGroup': {
        'Name': 'string',
        'Id': 'string',
        'Capacity': 123,
        'ARN': 'string',
        'Description': 'string',
        'Rules': [
            {
                'Name': 'string',
                'Priority': 123,
                'Statement': {
                    'ByteMatchStatement': {
                        'SearchString': b'bytes',
                        'FieldToMatch': {
                            'SingleHeader': {
                                'Name': 'string'
                            },
                            'SingleQueryArgument': {
                                'Name': 'string'
                            },
                            'AllQueryArguments': {},
                            'UriPath': {},
                            'QueryString': {},
                            'Body': {
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Method': {},
                            'JsonBody': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedPaths': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Headers': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedHeaders': [
                                        'string',
                                    ],
                                    'ExcludedHeaders': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Cookies': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedCookies': [
                                        'string',
                                    ],
                                    'ExcludedCookies': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            }
                        },
                        'TextTransformations': [
                            {
                                'Priority': 123,
                                'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                            },
                        ],
                        'PositionalConstraint': 'EXACTLY'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CONTAINS_WORD'
                    },
                    'SqliMatchStatement': {
                        'FieldToMatch': {
                            'SingleHeader': {
                                'Name': 'string'
                            },
                            'SingleQueryArgument': {
                                'Name': 'string'
                            },
                            'AllQueryArguments': {},
                            'UriPath': {},
                            'QueryString': {},
                            'Body': {
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Method': {},
                            'JsonBody': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedPaths': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Headers': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedHeaders': [
                                        'string',
                                    ],
                                    'ExcludedHeaders': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Cookies': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedCookies': [
                                        'string',
                                    ],
                                    'ExcludedCookies': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            }
                        },
                        'TextTransformations': [
                            {
                                'Priority': 123,
                                'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                            },
                        ],
                        'SensitivityLevel': 'LOW'|'HIGH'
                    },
                    'XssMatchStatement': {
                        'FieldToMatch': {
                            'SingleHeader': {
                                'Name': 'string'
                            },
                            'SingleQueryArgument': {
                                'Name': 'string'
                            },
                            'AllQueryArguments': {},
                            'UriPath': {},
                            'QueryString': {},
                            'Body': {
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Method': {},
                            'JsonBody': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedPaths': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Headers': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedHeaders': [
                                        'string',
                                    ],
                                    'ExcludedHeaders': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Cookies': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedCookies': [
                                        'string',
                                    ],
                                    'ExcludedCookies': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            }
                        },
                        'TextTransformations': [
                            {
                                'Priority': 123,
                                'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                            },
                        ]
                    },
                    'SizeConstraintStatement': {
                        'FieldToMatch': {
                            'SingleHeader': {
                                'Name': 'string'
                            },
                            'SingleQueryArgument': {
                                'Name': 'string'
                            },
                            'AllQueryArguments': {},
                            'UriPath': {},
                            'QueryString': {},
                            'Body': {
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Method': {},
                            'JsonBody': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedPaths': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Headers': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedHeaders': [
                                        'string',
                                    ],
                                    'ExcludedHeaders': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Cookies': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedCookies': [
                                        'string',
                                    ],
                                    'ExcludedCookies': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            }
                        },
                        'ComparisonOperator': 'EQ'|'NE'|'LE'|'LT'|'GE'|'GT',
                        'Size': 123,
                        'TextTransformations': [
                            {
                                'Priority': 123,
                                'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                            },
                        ]
                    },
                    'GeoMatchStatement': {
                        'CountryCodes': [
                            'AF'|'AX'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BQ'|'BA'|'BW'|'BV'|'BR'|'IO'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CG'|'CD'|'CK'|'CR'|'CI'|'HR'|'CU'|'CW'|'CY'|'CZ'|'DK'|'DJ'|'DM'|'DO'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'GF'|'PF'|'TF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GP'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HM'|'VA'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KP'|'KR'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MQ'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'NF'|'MP'|'NO'|'OM'|'PK'|'PW'|'PS'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'GS'|'SS'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TL'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'UG'|'UA'|'AE'|'GB'|'US'|'UM'|'UY'|'UZ'|'VU'|'VE'|'VN'|'VG'|'VI'|'WF'|'EH'|'YE'|'ZM'|'ZW'|'XK',
                        ],
                        'ForwardedIPConfig': {
                            'HeaderName': 'string',
                            'FallbackBehavior': 'MATCH'|'NO_MATCH'
                        }
                    },
                    'RuleGroupReferenceStatement': {
                        'ARN': 'string',
                        'ExcludedRules': [
                            {
                                'Name': 'string'
                            },
                        ],
                        'RuleActionOverrides': [
                            {
                                'Name': 'string',
                                'ActionToUse': {
                                    'Block': {
                                        'CustomResponse': {
                                            'ResponseCode': 123,
                                            'CustomResponseBodyKey': 'string',
                                            'ResponseHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    },
                                    'Allow': {
                                        'CustomRequestHandling': {
                                            'InsertHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    },
                                    'Count': {
                                        'CustomRequestHandling': {
                                            'InsertHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    },
                                    'Captcha': {
                                        'CustomRequestHandling': {
                                            'InsertHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    },
                                    'Challenge': {
                                        'CustomRequestHandling': {
                                            'InsertHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    }
                                }
                            },
                        ]
                    },
                    'IPSetReferenceStatement': {
                        'ARN': 'string',
                        'IPSetForwardedIPConfig': {
                            'HeaderName': 'string',
                            'FallbackBehavior': 'MATCH'|'NO_MATCH',
                            'Position': 'FIRST'|'LAST'|'ANY'
                        }
                    },
                    'RegexPatternSetReferenceStatement': {
                        'ARN': 'string',
                        'FieldToMatch': {
                            'SingleHeader': {
                                'Name': 'string'
                            },
                            'SingleQueryArgument': {
                                'Name': 'string'
                            },
                            'AllQueryArguments': {},
                            'UriPath': {},
                            'QueryString': {},
                            'Body': {
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Method': {},
                            'JsonBody': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedPaths': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Headers': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedHeaders': [
                                        'string',
                                    ],
                                    'ExcludedHeaders': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Cookies': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedCookies': [
                                        'string',
                                    ],
                                    'ExcludedCookies': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            }
                        },
                        'TextTransformations': [
                            {
                                'Priority': 123,
                                'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                            },
                        ]
                    },
                    'RateBasedStatement': {
                        'Limit': 123,
                        'AggregateKeyType': 'IP'|'FORWARDED_IP',
                        'ScopeDownStatement': {'... recursive ...'},
                        'ForwardedIPConfig': {
                            'HeaderName': 'string',
                            'FallbackBehavior': 'MATCH'|'NO_MATCH'
                        }
                    },
                    'AndStatement': {
                        'Statements': [
                            {'... recursive ...'},
                        ]
                    },
                    'OrStatement': {
                        'Statements': [
                            {'... recursive ...'},
                        ]
                    },
                    'NotStatement': {
                        'Statement': {'... recursive ...'}
                    },
                    'ManagedRuleGroupStatement': {
                        'VendorName': 'string',
                        'Name': 'string',
                        'Version': 'string',
                        'ExcludedRules': [
                            {
                                'Name': 'string'
                            },
                        ],
                        'ScopeDownStatement': {'... recursive ...'},
                        'ManagedRuleGroupConfigs': [
                            {
                                'LoginPath': 'string',
                                'PayloadType': 'JSON'|'FORM_ENCODED',
                                'UsernameField': {
                                    'Identifier': 'string'
                                },
                                'PasswordField': {
                                    'Identifier': 'string'
                                },
                                'AWSManagedRulesBotControlRuleSet': {
                                    'InspectionLevel': 'COMMON'|'TARGETED'
                                }
                            },
                        ],
                        'RuleActionOverrides': [
                            {
                                'Name': 'string',
                                'ActionToUse': {
                                    'Block': {
                                        'CustomResponse': {
                                            'ResponseCode': 123,
                                            'CustomResponseBodyKey': 'string',
                                            'ResponseHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    },
                                    'Allow': {
                                        'CustomRequestHandling': {
                                            'InsertHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    },
                                    'Count': {
                                        'CustomRequestHandling': {
                                            'InsertHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    },
                                    'Captcha': {
                                        'CustomRequestHandling': {
                                            'InsertHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    },
                                    'Challenge': {
                                        'CustomRequestHandling': {
                                            'InsertHeaders': [
                                                {
                                                    'Name': 'string',
                                                    'Value': 'string'
                                                },
                                            ]
                                        }
                                    }
                                }
                            },
                        ]
                    },
                    'LabelMatchStatement': {
                        'Scope': 'LABEL'|'NAMESPACE',
                        'Key': 'string'
                    },
                    'RegexMatchStatement': {
                        'RegexString': 'string',
                        'FieldToMatch': {
                            'SingleHeader': {
                                'Name': 'string'
                            },
                            'SingleQueryArgument': {
                                'Name': 'string'
                            },
                            'AllQueryArguments': {},
                            'UriPath': {},
                            'QueryString': {},
                            'Body': {
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Method': {},
                            'JsonBody': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedPaths': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Headers': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedHeaders': [
                                        'string',
                                    ],
                                    'ExcludedHeaders': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            },
                            'Cookies': {
                                'MatchPattern': {
                                    'All': {},
                                    'IncludedCookies': [
                                        'string',
                                    ],
                                    'ExcludedCookies': [
                                        'string',
                                    ]
                                },
                                'MatchScope': 'ALL'|'KEY'|'VALUE',
                                'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                            }
                        },
                        'TextTransformations': [
                            {
                                'Priority': 123,
                                'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                            },
                        ]
                    }
                },
                'Action': {
                    'Block': {
                        'CustomResponse': {
                            'ResponseCode': 123,
                            'CustomResponseBodyKey': 'string',
                            'ResponseHeaders': [
                                {
                                    'Name': 'string',
                                    'Value': 'string'
                                },
                            ]
                        }
                    },
                    'Allow': {
                        'CustomRequestHandling': {
                            'InsertHeaders': [
                                {
                                    'Name': 'string',
                                    'Value': 'string'
                                },
                            ]
                        }
                    },
                    'Count': {
                        'CustomRequestHandling': {
                            'InsertHeaders': [
                                {
                                    'Name': 'string',
                                    'Value': 'string'
                                },
                            ]
                        }
                    },
                    'Captcha': {
                        'CustomRequestHandling': {
                            'InsertHeaders': [
                                {
                                    'Name': 'string',
                                    'Value': 'string'
                                },
                            ]
                        }
                    },
                    'Challenge': {
                        'CustomRequestHandling': {
                            'InsertHeaders': [
                                {
                                    'Name': 'string',
                                    'Value': 'string'
                                },
                            ]
                        }
                    }
                },
                'OverrideAction': {
                    'Count': {
                        'CustomRequestHandling': {
                            'InsertHeaders': [
                                {
                                    'Name': 'string',
                                    'Value': 'string'
                                },
                            ]
                        }
                    },
                    'None': {}
                },
                'RuleLabels': [
                    {
                        'Name': 'string'
                    },
                ],
                'VisibilityConfig': {
                    'SampledRequestsEnabled': True|False,
                    'CloudWatchMetricsEnabled': True|False,
                    'MetricName': 'string'
                },
                'CaptchaConfig': {
                    'ImmunityTimeProperty': {
                        'ImmunityTime': 123
                    }
                },
                'ChallengeConfig': {
                    'ImmunityTimeProperty': {
                        'ImmunityTime': 123
                    }
                }
            },
        ],
        'VisibilityConfig': {
            'SampledRequestsEnabled': True|False,
            'CloudWatchMetricsEnabled': True|False,
            'MetricName': 'string'
        },
        'LabelNamespace': 'string',
        'CustomResponseBodies': {
            'string': {
                'ContentType': 'TEXT_PLAIN'|'TEXT_HTML'|'APPLICATION_JSON',
                'Content': 'string'
            }
        },
        'AvailableLabels': [
            {
                'Name': 'string'
            },
        ],
        'ConsumedLabels': [
            {
                'Name': 'string'
            },
        ]
    },
    'LockToken': 'string'
}


**Response Structure**
::

    # This section is too large to render.
    # Please see the AWS API Documentation linked below.

`AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup>`_
GetSampledRequests (updated) Link ¶
Changes (response)
{'SampledRequests': {'CaptchaResponse': {'FailureReason': {'TOKEN_DOMAIN_MISMATCH',
                                                           'TOKEN_INVALID'}},
                     'ChallengeResponse': {'FailureReason': 'TOKEN_MISSING | '
                                                            'TOKEN_EXPIRED | '
                                                            'TOKEN_INVALID | '
                                                            'TOKEN_DOMAIN_MISMATCH',
                                           'ResponseCode': 'integer',
                                           'SolveTimestamp': 'long'},
                     'OverriddenAction': 'string'}}

Gets detailed information about a specified number of requests--a sample--that WAF randomly selects from among the first 5,000 requests that your Amazon Web Services resource received during a time range that you choose. You can specify a sample size of up to 500 requests, and you can specify any time range in the previous three hours.

GetSampledRequests returns a time range, which is usually the time range that you specified. However, if your resource (such as a CloudFront distribution) received 5,000 requests before the specified time range elapsed, GetSampledRequests returns an updated time range. This new time range indicates the actual period during which WAF selected the requests in the sample.

See also: AWS API Documentation

Request Syntax

client.get_sampled_requests(
    WebAclArn='string',
    RuleMetricName='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    TimeWindow={
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1)
    },
    MaxItems=123
)
type WebAclArn:

string

param WebAclArn:

[REQUIRED]

The Amazon resource name (ARN) of the WebACL for which you want a sample of requests.

type RuleMetricName:

string

param RuleMetricName:

[REQUIRED]

The metric name assigned to the Rule or RuleGroup for which you want a sample of requests.

type Scope:

string

param Scope:

[REQUIRED]

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 AppSync GraphQL API, or an Amazon Cognito user pool.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.

  • API and SDKs - For all calls, use the Region endpoint us-east-1.

type TimeWindow:

dict

param TimeWindow:

[REQUIRED]

The start date and time and the end date and time of the range for which you want GetSampledRequests to return a sample of requests. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours. If you specify a start time that's earlier than three hours ago, WAF sets it to three hours ago.

  • StartTime (datetime) -- [REQUIRED]

    The beginning of the time range from which you want GetSampledRequests to return a sample of the requests that your Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours.

  • EndTime (datetime) -- [REQUIRED]

    The end of the time range from which you want GetSampledRequests to return a sample of the requests that your Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours.

type MaxItems:

integer

param MaxItems:

[REQUIRED]

The number of requests that you want WAF to return from among the first 5,000 requests that your Amazon Web Services resource received during the time range. If your resource received fewer requests than the value of MaxItems, GetSampledRequests returns information about all of them.

rtype:

dict

returns:

Response Syntax

{
    'SampledRequests': [
        {
            'Request': {
                'ClientIP': 'string',
                'Country': 'string',
                'URI': 'string',
                'Method': 'string',
                'HTTPVersion': 'string',
                'Headers': [
                    {
                        'Name': 'string',
                        'Value': 'string'
                    },
                ]
            },
            'Weight': 123,
            'Timestamp': datetime(2015, 1, 1),
            'Action': 'string',
            'RuleNameWithinRuleGroup': 'string',
            'RequestHeadersInserted': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'ResponseCodeSent': 123,
            'Labels': [
                {
                    'Name': 'string'
                },
            ],
            'CaptchaResponse': {
                'ResponseCode': 123,
                'SolveTimestamp': 123,
                'FailureReason': 'TOKEN_MISSING'|'TOKEN_EXPIRED'|'TOKEN_INVALID'|'TOKEN_DOMAIN_MISMATCH'
            },
            'ChallengeResponse': {
                'ResponseCode': 123,
                'SolveTimestamp': 123,
                'FailureReason': 'TOKEN_MISSING'|'TOKEN_EXPIRED'|'TOKEN_INVALID'|'TOKEN_DOMAIN_MISMATCH'
            },
            'OverriddenAction': 'string'
        },
    ],
    'PopulationSize': 123,
    'TimeWindow': {
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SampledRequests (list) --

      A complex type that contains detailed information about each of the requests in the sample.

      • (dict) --

        Represents a single sampled web request. The response from GetSampledRequests includes a SampledHTTPRequests complex type that appears as SampledRequests in the response syntax. SampledHTTPRequests contains an array of SampledHTTPRequest objects.

        • Request (dict) --

          A complex type that contains detailed information about the request.

          • ClientIP (string) --

            The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:

            • c-ip, if the viewer did not use an HTTP proxy or a load balancer to send the request

            • x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer to send the request

          • Country (string) --

            The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.

          • URI (string) --

            The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg.

          • Method (string) --

            The HTTP method specified in the sampled web request.

          • HTTPVersion (string) --

            The HTTP version specified in the sampled web request, for example, HTTP/1.1.

          • Headers (list) --

            A complex type that contains the name and value for each header in the sampled web request.

            • (dict) --

              Part of the response from GetSampledRequests. This is a complex type that appears as Headers in the response syntax. HTTPHeader contains the names and values of all of the headers that appear in one of the web requests.

              • Name (string) --

                The name of the HTTP header.

              • Value (string) --

                The value of the HTTP header.

        • Weight (integer) --

          A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of 2 represents roughly twice as many web requests as a result that has a weight of 1.

        • Timestamp (datetime) --

          The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).

        • Action (string) --

          The action that WAF applied to the request.

        • RuleNameWithinRuleGroup (string) --

          The name of the Rule that the request matched. For managed rule groups, the format for this name is <vendor name>#<managed rule group name>#<rule name>. For your own rule groups, the format for this name is <rule group name>#<rule name>. If the rule is not in a rule group, this field is absent.

        • RequestHeadersInserted (list) --

          Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.

          • (dict) --

            Part of the response from GetSampledRequests. This is a complex type that appears as Headers in the response syntax. HTTPHeader contains the names and values of all of the headers that appear in one of the web requests.

            • Name (string) --

              The name of the HTTP header.

            • Value (string) --

              The value of the HTTP header.

        • ResponseCodeSent (integer) --

          The response code that was sent for the request.

        • Labels (list) --

          Labels applied to the web request by matching rules. 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.

          For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA or awswaf:managed:aws:managed-rule-set:header:encoding:utf8.

          • (dict) --

            A single label container. This is used as an element of a label array in multiple contexts, for example, in RuleLabels inside a Rule and in Labels inside a SampledHTTPRequest.

            • Name (string) --

              The label string.

        • CaptchaResponse (dict) --

          The CAPTCHA response for the request.

          • ResponseCode (integer) --

            The HTTP response code indicating the status of the CAPTCHA token in the web request. If the token is missing, invalid, or expired, this code is 405 Method Not Allowed.

          • SolveTimestamp (integer) --

            The time that the CAPTCHA was last solved for the supplied token.

          • FailureReason (string) --

            The reason for failure, populated when the evaluation of the token fails.

        • ChallengeResponse (dict) --

          The Challenge response for the request.

          • ResponseCode (integer) --

            The HTTP response code indicating the status of the challenge token in the web request. If the token is missing, invalid, or expired, this code is 202 Request Accepted.

          • SolveTimestamp (integer) --

            The time that the challenge was last solved for the supplied token.

          • FailureReason (string) --

            The reason for failure, populated when the evaluation of the token fails.

        • OverriddenAction (string) --

          Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the Action value.

    • PopulationSize (integer) --

      The total number of requests from which GetSampledRequests got a sample of MaxItems requests. If PopulationSize is less than MaxItems, the sample includes every request that your Amazon Web Services resource received during the specified time range.

    • TimeWindow (dict) --

      Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. However, if your Amazon Web Services resource received more than 5,000 requests during the time range that you specified in the request, GetSampledRequests returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.

      • StartTime (datetime) --

        The beginning of the time range from which you want GetSampledRequests to return a sample of the requests that your Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours.

      • EndTime (datetime) --

        The end of the time range from which you want GetSampledRequests to return a sample of the requests that your Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours.

GetWebACL (updated) Link ¶
Changes (response)
{'WebACL': {'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
            'PostProcessFirewallManagerRuleGroups': {'FirewallManagerStatement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                                                                                    '| '
                                                                                                                                                                                                    'TARGETED'}},
                                                                                                                'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                'Value': 'string'}]}},
                                                                                                                                                         'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                      'ResponseCode': 'integer',
                                                                                                                                                                                      'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                           'Value': 'string'}]}},
                                                                                                                                                         'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                                                                         'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                    'Value': 'string'}]}},
                                                                                                                                                         'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                'Value': 'string'}]}}},
                                                                                                                                         'Name': 'string'}],
                                                                                                                'ScopeDownStatement': {'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                       'Value': 'string'}]}},
                                                                                                                                                                                                                'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                                                                             'ResponseCode': 'integer',
                                                                                                                                                                                                                                             'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                                                                                                                                'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                         'Value': 'string'}]}},
                                                                                                                                                                                                                'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                           'Value': 'string'}]}},
                                                                                                                                                                                                                'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                       'Value': 'string'}]}}},
                                                                                                                                                                                                'Name': 'string'}]}}},
                                                                                  'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                                                                           'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                        'ResponseCode': 'integer',
                                                                                                                                                                                        'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                             'Value': 'string'}]}},
                                                                                                                                                           'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                    'Value': 'string'}]}},
                                                                                                                                                           'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                      'Value': 'string'}]}},
                                                                                                                                                           'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                  'Value': 'string'}]}}},
                                                                                                                                           'Name': 'string'}]}}},
            'PreProcessFirewallManagerRuleGroups': {'FirewallManagerStatement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                                                                                   '| '
                                                                                                                                                                                                   'TARGETED'}},
                                                                                                               'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                               'Value': 'string'}]}},
                                                                                                                                                        'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                     'ResponseCode': 'integer',
                                                                                                                                                                                     'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                          'Value': 'string'}]}},
                                                                                                                                                        'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                 'Value': 'string'}]}},
                                                                                                                                                        'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                   'Value': 'string'}]}},
                                                                                                                                                        'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                               'Value': 'string'}]}}},
                                                                                                                                        'Name': 'string'}],
                                                                                                               'ScopeDownStatement': {'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                      'Value': 'string'}]}},
                                                                                                                                                                                                               'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                                                                            'ResponseCode': 'integer',
                                                                                                                                                                                                                                            'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                 'Value': 'string'}]}},
                                                                                                                                                                                                               'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                        'Value': 'string'}]}},
                                                                                                                                                                                                               'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                          'Value': 'string'}]}},
                                                                                                                                                                                                               'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                      'Value': 'string'}]}}},
                                                                                                                                                                                               'Name': 'string'}]}}},
                                                                                 'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                 'Value': 'string'}]}},
                                                                                                                                                          'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                       'ResponseCode': 'integer',
                                                                                                                                                                                       'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                            'Value': 'string'}]}},
                                                                                                                                                          'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                   'Value': 'string'}]}},
                                                                                                                                                          'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                     'Value': 'string'}]}},
                                                                                                                                                          'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                 'Value': 'string'}]}}},
                                                                                                                                          'Name': 'string'}]}}},
            'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                            'Value': 'string'}]}}},
                      'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
                      'Statement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                                      '| '
                                                                                                                                                      'TARGETED'}},
                                                                  'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                           'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                        'ResponseCode': 'integer',
                                                                                                                                        'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                             'Value': 'string'}]}},
                                                                                                           'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                    'Value': 'string'}]}},
                                                                                                           'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                      'Value': 'string'}]}},
                                                                                                           'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                  'Value': 'string'}]}}},
                                                                                           'Name': 'string'}]},
                                    'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                    'Value': 'string'}]}},
                                                                                                             'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                          'ResponseCode': 'integer',
                                                                                                                                          'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                               'Value': 'string'}]}},
                                                                                                             'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                      'Value': 'string'}]}},
                                                                                                             'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                        'Value': 'string'}]}},
                                                                                                             'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                    'Value': 'string'}]}}},
                                                                                             'Name': 'string'}]}}},
            'TokenDomains': ['string']}}

Retrieves the specified WebACL.

See also: AWS API Documentation

Request Syntax

client.get_web_acl(
    Name='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    Id='string'
)
type Name:

string

param Name:

[REQUIRED]

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

type Scope:

string

param Scope:

[REQUIRED]

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 AppSync GraphQL API, or an Amazon Cognito user pool.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.

  • API and SDKs - For all calls, use the Region endpoint us-east-1.

type Id:

string

param Id:

[REQUIRED]

The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.

rtype:

dict

returns:

Response Syntax

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

Response Structure

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

GetWebACLForResource (updated) Link ¶
Changes (response)
{'WebACL': {'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
            'PostProcessFirewallManagerRuleGroups': {'FirewallManagerStatement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                                                                                    '| '
                                                                                                                                                                                                    'TARGETED'}},
                                                                                                                'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                'Value': 'string'}]}},
                                                                                                                                                         'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                      'ResponseCode': 'integer',
                                                                                                                                                                                      'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                           'Value': 'string'}]}},
                                                                                                                                                         'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                                                                         'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                    'Value': 'string'}]}},
                                                                                                                                                         'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                'Value': 'string'}]}}},
                                                                                                                                         'Name': 'string'}],
                                                                                                                'ScopeDownStatement': {'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                       'Value': 'string'}]}},
                                                                                                                                                                                                                'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                                                                             'ResponseCode': 'integer',
                                                                                                                                                                                                                                             'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                                                                                                                                'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                         'Value': 'string'}]}},
                                                                                                                                                                                                                'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                           'Value': 'string'}]}},
                                                                                                                                                                                                                'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                       'Value': 'string'}]}}},
                                                                                                                                                                                                'Name': 'string'}]}}},
                                                                                  'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                                                                           'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                        'ResponseCode': 'integer',
                                                                                                                                                                                        'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                             'Value': 'string'}]}},
                                                                                                                                                           'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                    'Value': 'string'}]}},
                                                                                                                                                           'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                      'Value': 'string'}]}},
                                                                                                                                                           'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                  'Value': 'string'}]}}},
                                                                                                                                           'Name': 'string'}]}}},
            'PreProcessFirewallManagerRuleGroups': {'FirewallManagerStatement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                                                                                   '| '
                                                                                                                                                                                                   'TARGETED'}},
                                                                                                               'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                               'Value': 'string'}]}},
                                                                                                                                                        'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                     'ResponseCode': 'integer',
                                                                                                                                                                                     'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                          'Value': 'string'}]}},
                                                                                                                                                        'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                 'Value': 'string'}]}},
                                                                                                                                                        'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                   'Value': 'string'}]}},
                                                                                                                                                        'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                               'Value': 'string'}]}}},
                                                                                                                                        'Name': 'string'}],
                                                                                                               'ScopeDownStatement': {'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                      'Value': 'string'}]}},
                                                                                                                                                                                                               'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                                                                            'ResponseCode': 'integer',
                                                                                                                                                                                                                                            'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                 'Value': 'string'}]}},
                                                                                                                                                                                                               'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                        'Value': 'string'}]}},
                                                                                                                                                                                                               'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                          'Value': 'string'}]}},
                                                                                                                                                                                                               'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                                                                      'Value': 'string'}]}}},
                                                                                                                                                                                               'Name': 'string'}]}}},
                                                                                 'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                 'Value': 'string'}]}},
                                                                                                                                                          'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                                                                       'ResponseCode': 'integer',
                                                                                                                                                                                       'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                                                                            'Value': 'string'}]}},
                                                                                                                                                          'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                   'Value': 'string'}]}},
                                                                                                                                                          'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                     'Value': 'string'}]}},
                                                                                                                                                          'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                                                                 'Value': 'string'}]}}},
                                                                                                                                          'Name': 'string'}]}}},
            'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                            'Value': 'string'}]}}},
                      'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
                      'Statement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                                      '| '
                                                                                                                                                      'TARGETED'}},
                                                                  'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                  'Value': 'string'}]}},
                                                                                                           'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                        'ResponseCode': 'integer',
                                                                                                                                        'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                             'Value': 'string'}]}},
                                                                                                           'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                    'Value': 'string'}]}},
                                                                                                           'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                      'Value': 'string'}]}},
                                                                                                           'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                  'Value': 'string'}]}}},
                                                                                           'Name': 'string'}]},
                                    'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                    'Value': 'string'}]}},
                                                                                                             'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                                          'ResponseCode': 'integer',
                                                                                                                                          'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                               'Value': 'string'}]}},
                                                                                                             'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                      'Value': 'string'}]}},
                                                                                                             'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                        'Value': 'string'}]}},
                                                                                                             'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                                    'Value': 'string'}]}}},
                                                                                             'Name': 'string'}]}}},
            'TokenDomains': ['string']}}

Retrieves the WebACL for the specified resource.

See also: AWS API Documentation

Request Syntax

client.get_web_acl_for_resource(
    ResourceArn='string'
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource whose web ACL you want to retrieve.

The ARN must be in one of the following formats:

  • For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id

  • For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name

  • For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId

  • For an Amazon Cognito user pool: arn:aws:cognito-idp:region:account-id:userpool/user-pool-id

rtype:

dict

returns:

Response Syntax

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

Response Structure

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

ListLoggingConfigurations (updated) Link ¶
Changes (response)
{'LoggingConfigurations': {'LoggingFilter': {'Filters': {'Conditions': {'ActionCondition': {'Action': {'CHALLENGE'}}}}}}}

Retrieves an array of your LoggingConfiguration objects.

See also: AWS API Documentation

Request Syntax

client.list_logging_configurations(
    Scope='CLOUDFRONT'|'REGIONAL',
    NextMarker='string',
    Limit=123
)
type Scope:

string

param Scope:

[REQUIRED]

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 AppSync GraphQL API, or an Amazon Cognito user pool.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.

  • API and SDKs - For all calls, use the Region endpoint us-east-1.

type NextMarker:

string

param NextMarker:

When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

type Limit:

integer

param Limit:

The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a NextMarker value that you can use in a subsequent call to get the next batch of objects.

rtype:

dict

returns:

Response Syntax

{
    'LoggingConfigurations': [
        {
            'ResourceArn': 'string',
            'LogDestinationConfigs': [
                'string',
            ],
            'RedactedFields': [
                {
                    'SingleHeader': {
                        'Name': 'string'
                    },
                    'SingleQueryArgument': {
                        'Name': 'string'
                    },
                    'AllQueryArguments': {},
                    'UriPath': {},
                    'QueryString': {},
                    'Body': {
                        'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                    },
                    'Method': {},
                    'JsonBody': {
                        'MatchPattern': {
                            'All': {},
                            'IncludedPaths': [
                                'string',
                            ]
                        },
                        'MatchScope': 'ALL'|'KEY'|'VALUE',
                        'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                        'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                    },
                    'Headers': {
                        'MatchPattern': {
                            'All': {},
                            'IncludedHeaders': [
                                'string',
                            ],
                            'ExcludedHeaders': [
                                'string',
                            ]
                        },
                        'MatchScope': 'ALL'|'KEY'|'VALUE',
                        'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                    },
                    'Cookies': {
                        'MatchPattern': {
                            'All': {},
                            'IncludedCookies': [
                                'string',
                            ],
                            'ExcludedCookies': [
                                'string',
                            ]
                        },
                        'MatchScope': 'ALL'|'KEY'|'VALUE',
                        'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                    }
                },
            ],
            'ManagedByFirewallManager': True|False,
            'LoggingFilter': {
                'Filters': [
                    {
                        'Behavior': 'KEEP'|'DROP',
                        'Requirement': 'MEETS_ALL'|'MEETS_ANY',
                        'Conditions': [
                            {
                                'ActionCondition': {
                                    'Action': 'ALLOW'|'BLOCK'|'COUNT'|'CAPTCHA'|'CHALLENGE'|'EXCLUDED_AS_COUNT'
                                },
                                'LabelNameCondition': {
                                    'LabelName': 'string'
                                }
                            },
                        ]
                    },
                ],
                'DefaultBehavior': 'KEEP'|'DROP'
            }
        },
    ],
    'NextMarker': 'string'
}

Response Structure

  • (dict) --

    • LoggingConfigurations (list) --

      • (dict) --

        Defines an association between logging destinations and a web ACL resource, for logging from WAF. As part of the association, you can specify parts of the standard logging fields to keep out of the logs and you can specify filters so that you log only a subset of the logging records.

        You can access information about the traffic that WAF inspects using the following steps:

        • Create your logging destination. You can use an Amazon CloudWatch Logs log group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon Kinesis Data Firehose. For information about configuring logging destinations and the permissions that are required for each, see Logging web ACL traffic information in the WAF Developer Guide.

        • Associate your logging destination to your web ACL using a PutLoggingConfiguration request.

        When you successfully enable logging using a PutLoggingConfiguration request, WAF creates an additional role or policy that is required to write logs to the logging destination. For an Amazon CloudWatch Logs log group, WAF creates a resource policy on the log group. For an Amazon S3 bucket, WAF creates a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked role.

        For additional information about web ACL logging, see Logging web ACL traffic information in the WAF Developer Guide.

        • ResourceArn (string) --

          The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs.

        • LogDestinationConfigs (list) --

          The logging destination configuration that you want to associate with the web ACL.

          • (string) --

        • RedactedFields (list) --

          The parts of the request that you want to keep out of the logs. For example, if you redact the SingleHeader field, the HEADER field in the logs will be xxx.

          • (dict) --

            The part of the web request that you want 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" } }

            • SingleHeader (dict) --

              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.

              • Name (string) --

                The name of the query header to inspect.

            • SingleQueryArgument (dict) --

              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" }

              • Name (string) --

                The name of the query argument to inspect.

            • AllQueryArguments (dict) --

              Inspect all query arguments.

            • UriPath (dict) --

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

            • QueryString (dict) --

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

            • Body (dict) --

              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.

              Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the Body object configuration.

              • OversizeHandling (string) --

                What WAF should do if the body is larger than WAF can inspect. WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.

                The options for oversize handling are the following:

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

                • MATCH - Treat the web request as matching the rule statement. 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 8 KB.

                Default: CONTINUE

            • Method (dict) --

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

            • JsonBody (dict) --

              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.

              Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the JsonBody object configuration.

              • MatchPattern (dict) --

                The patterns to look for in the JSON body. WAF inspects the results of these pattern matches against the rule inspection criteria.

                • All (dict) --

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

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

                • IncludedPaths (list) --

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

                  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.

                  • (string) --

              • MatchScope (string) --

                The parts of the JSON to match against using the MatchPattern. If you specify All, WAF matches against keys and values.

              • InvalidFallbackBehavior (string) --

                What 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. 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. 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, WAF parses and evaluates the content only up to the first parsing failure that it encounters.

                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.

                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"}

              • OversizeHandling (string) --

                What WAF should do if the body is larger than WAF can inspect. WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.

                The options for oversize handling are the following:

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

                • MATCH - Treat the web request as matching the rule statement. 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 8 KB.

                Default: CONTINUE

            • Headers (dict) --

              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 WAF inspects.

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

              • MatchPattern (dict) --

                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"} }

                • All (dict) --

                  Inspect all headers.

                • IncludedHeaders (list) --

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

                  • (string) --

                • ExcludedHeaders (list) --

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

                  • (string) --

              • MatchScope (string) --

                The parts of the headers to match with the rule inspection criteria. If you specify All, WAF inspects both keys and values.

              • OversizeHandling (string) --

                What WAF should do if the headers of the request are larger than WAF can inspect. 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 WAF.

                The options for oversize handling are the following:

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

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

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

            • Cookies (dict) --

              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 WAF inspects.

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

              • MatchPattern (dict) --

                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"} }

                • All (dict) --

                  Inspect all cookies.

                • IncludedCookies (list) --

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

                  • (string) --

                • ExcludedCookies (list) --

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

                  • (string) --

              • MatchScope (string) --

                The parts of the cookies to inspect with the rule inspection criteria. If you specify All, WAF inspects both keys and values.

              • OversizeHandling (string) --

                What WAF should do if the cookies of the request are larger than WAF can inspect. 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 WAF.

                The options for oversize handling are the following:

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

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

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

        • ManagedByFirewallManager (boolean) --

          Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.

        • LoggingFilter (dict) --

          Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.

          • Filters (list) --

            The filters that you want to apply to the logs.

            • (dict) --

              A single logging filter, used in LoggingFilter.

              • Behavior (string) --

                How to handle logs that satisfy the filter's conditions and requirement.

              • Requirement (string) --

                Logic to apply to the filtering conditions. You can specify that, in order to satisfy the filter, a log must match all conditions or must match at least one condition.

              • Conditions (list) --

                Match conditions for the filter.

                • (dict) --

                  A single match condition for a Filter.

                  • ActionCondition (dict) --

                    A single action condition. This is the action setting that a log record must contain in order to meet the condition.

                    • Action (string) --

                      The action setting that a log record must contain in order to meet the condition. This is the action that WAF applied to the web request.

                      For rule groups, this is either the configured rule action setting, or if you've applied a rule action override to the rule, it's the override action. The value EXCLUDED_AS_COUNT matches on excluded rules and also on rules that have a rule action override of Count.

                  • LabelNameCondition (dict) --

                    A single label name condition. This is the fully qualified label name that a log record must contain in order to meet the condition. 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.

                    • LabelName (string) --

                      The label name that a log record must contain in order to meet the condition. This must be a fully qualified label name. 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.

          • DefaultBehavior (string) --

            Default handling for logs that don't match any of the specified filtering conditions.

    • NextMarker (string) --

      When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

PutLoggingConfiguration (updated) Link ¶
Changes (both)
{'LoggingConfiguration': {'LoggingFilter': {'Filters': {'Conditions': {'ActionCondition': {'Action': {'CHALLENGE'}}}}}}}

Enables the specified LoggingConfiguration, to start logging from a web ACL, according to the configuration provided.

You can access information about the traffic that WAF inspects using the following steps:

  • Create your logging destination. You can use an Amazon CloudWatch Logs log group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon Kinesis Data Firehose. For information about configuring logging destinations and the permissions that are required for each, see Logging web ACL traffic information in the WAF Developer Guide.

  • Associate your logging destination to your web ACL using a PutLoggingConfiguration request.

When you successfully enable logging using a PutLoggingConfiguration request, WAF creates an additional role or policy that is required to write logs to the logging destination. For an Amazon CloudWatch Logs log group, WAF creates a resource policy on the log group. For an Amazon S3 bucket, WAF creates a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked role.

For additional information about web ACL logging, see Logging web ACL traffic information in the WAF Developer Guide.

See also: AWS API Documentation

Request Syntax

client.put_logging_configuration(
    LoggingConfiguration={
        'ResourceArn': 'string',
        'LogDestinationConfigs': [
            'string',
        ],
        'RedactedFields': [
            {
                'SingleHeader': {
                    'Name': 'string'
                },
                'SingleQueryArgument': {
                    'Name': 'string'
                },
                'AllQueryArguments': {}
                ,
                'UriPath': {}
                ,
                'QueryString': {}
                ,
                'Body': {
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Method': {}
                ,
                'JsonBody': {
                    'MatchPattern': {
                        'All': {}
                        ,
                        'IncludedPaths': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Headers': {
                    'MatchPattern': {
                        'All': {}
                        ,
                        'IncludedHeaders': [
                            'string',
                        ],
                        'ExcludedHeaders': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Cookies': {
                    'MatchPattern': {
                        'All': {}
                        ,
                        'IncludedCookies': [
                            'string',
                        ],
                        'ExcludedCookies': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                }
            },
        ],
        'ManagedByFirewallManager': True|False,
        'LoggingFilter': {
            'Filters': [
                {
                    'Behavior': 'KEEP'|'DROP',
                    'Requirement': 'MEETS_ALL'|'MEETS_ANY',
                    'Conditions': [
                        {
                            'ActionCondition': {
                                'Action': 'ALLOW'|'BLOCK'|'COUNT'|'CAPTCHA'|'CHALLENGE'|'EXCLUDED_AS_COUNT'
                            },
                            'LabelNameCondition': {
                                'LabelName': 'string'
                            }
                        },
                    ]
                },
            ],
            'DefaultBehavior': 'KEEP'|'DROP'
        }
    }
)
type LoggingConfiguration:

dict

param LoggingConfiguration:

[REQUIRED]

  • ResourceArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs.

  • LogDestinationConfigs (list) -- [REQUIRED]

    The logging destination configuration that you want to associate with the web ACL.

    • (string) --

  • RedactedFields (list) --

    The parts of the request that you want to keep out of the logs. For example, if you redact the SingleHeader field, the HEADER field in the logs will be xxx.

    • (dict) --

      The part of the web request that you want 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" } }

      • SingleHeader (dict) --

        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.

        • Name (string) -- [REQUIRED]

          The name of the query header to inspect.

      • SingleQueryArgument (dict) --

        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" }

        • Name (string) -- [REQUIRED]

          The name of the query argument to inspect.

      • AllQueryArguments (dict) --

        Inspect all query arguments.

      • UriPath (dict) --

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

      • QueryString (dict) --

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

      • Body (dict) --

        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.

        Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the Body object configuration.

        • OversizeHandling (string) --

          What WAF should do if the body is larger than WAF can inspect. WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.

          The options for oversize handling are the following:

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

          • MATCH - Treat the web request as matching the rule statement. 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 8 KB.

          Default: CONTINUE

      • Method (dict) --

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

      • JsonBody (dict) --

        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.

        Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the JsonBody object configuration.

        • MatchPattern (dict) -- [REQUIRED]

          The patterns to look for in the JSON body. WAF inspects the results of these pattern matches against the rule inspection criteria.

          • All (dict) --

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

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

          • IncludedPaths (list) --

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

            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.

            • (string) --

        • MatchScope (string) -- [REQUIRED]

          The parts of the JSON to match against using the MatchPattern. If you specify All, WAF matches against keys and values.

        • InvalidFallbackBehavior (string) --

          What 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. 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. 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, WAF parses and evaluates the content only up to the first parsing failure that it encounters.

          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.

          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"}

        • OversizeHandling (string) --

          What WAF should do if the body is larger than WAF can inspect. WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.

          The options for oversize handling are the following:

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

          • MATCH - Treat the web request as matching the rule statement. 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 8 KB.

          Default: CONTINUE

      • Headers (dict) --

        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 WAF inspects.

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

        • MatchPattern (dict) -- [REQUIRED]

          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"} }

          • All (dict) --

            Inspect all headers.

          • IncludedHeaders (list) --

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

            • (string) --

          • ExcludedHeaders (list) --

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

            • (string) --

        • MatchScope (string) -- [REQUIRED]

          The parts of the headers to match with the rule inspection criteria. If you specify All, WAF inspects both keys and values.

        • OversizeHandling (string) -- [REQUIRED]

          What WAF should do if the headers of the request are larger than WAF can inspect. 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 WAF.

          The options for oversize handling are the following:

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

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

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

      • Cookies (dict) --

        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 WAF inspects.

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

        • MatchPattern (dict) -- [REQUIRED]

          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"} }

          • All (dict) --

            Inspect all cookies.

          • IncludedCookies (list) --

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

            • (string) --

          • ExcludedCookies (list) --

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

            • (string) --

        • MatchScope (string) -- [REQUIRED]

          The parts of the cookies to inspect with the rule inspection criteria. If you specify All, WAF inspects both keys and values.

        • OversizeHandling (string) -- [REQUIRED]

          What WAF should do if the cookies of the request are larger than WAF can inspect. 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 WAF.

          The options for oversize handling are the following:

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

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

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

  • ManagedByFirewallManager (boolean) --

    Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.

  • LoggingFilter (dict) --

    Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.

    • Filters (list) -- [REQUIRED]

      The filters that you want to apply to the logs.

      • (dict) --

        A single logging filter, used in LoggingFilter.

        • Behavior (string) -- [REQUIRED]

          How to handle logs that satisfy the filter's conditions and requirement.

        • Requirement (string) -- [REQUIRED]

          Logic to apply to the filtering conditions. You can specify that, in order to satisfy the filter, a log must match all conditions or must match at least one condition.

        • Conditions (list) -- [REQUIRED]

          Match conditions for the filter.

          • (dict) --

            A single match condition for a Filter.

            • ActionCondition (dict) --

              A single action condition. This is the action setting that a log record must contain in order to meet the condition.

              • Action (string) -- [REQUIRED]

                The action setting that a log record must contain in order to meet the condition. This is the action that WAF applied to the web request.

                For rule groups, this is either the configured rule action setting, or if you've applied a rule action override to the rule, it's the override action. The value EXCLUDED_AS_COUNT matches on excluded rules and also on rules that have a rule action override of Count.

            • LabelNameCondition (dict) --

              A single label name condition. This is the fully qualified label name that a log record must contain in order to meet the condition. 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.

              • LabelName (string) -- [REQUIRED]

                The label name that a log record must contain in order to meet the condition. This must be a fully qualified label name. 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.

    • DefaultBehavior (string) -- [REQUIRED]

      Default handling for logs that don't match any of the specified filtering conditions.

rtype:

dict

returns:

Response Syntax

{
    'LoggingConfiguration': {
        'ResourceArn': 'string',
        'LogDestinationConfigs': [
            'string',
        ],
        'RedactedFields': [
            {
                'SingleHeader': {
                    'Name': 'string'
                },
                'SingleQueryArgument': {
                    'Name': 'string'
                },
                'AllQueryArguments': {},
                'UriPath': {},
                'QueryString': {},
                'Body': {
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Method': {},
                'JsonBody': {
                    'MatchPattern': {
                        'All': {},
                        'IncludedPaths': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Headers': {
                    'MatchPattern': {
                        'All': {},
                        'IncludedHeaders': [
                            'string',
                        ],
                        'ExcludedHeaders': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                },
                'Cookies': {
                    'MatchPattern': {
                        'All': {},
                        'IncludedCookies': [
                            'string',
                        ],
                        'ExcludedCookies': [
                            'string',
                        ]
                    },
                    'MatchScope': 'ALL'|'KEY'|'VALUE',
                    'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                }
            },
        ],
        'ManagedByFirewallManager': True|False,
        'LoggingFilter': {
            'Filters': [
                {
                    'Behavior': 'KEEP'|'DROP',
                    'Requirement': 'MEETS_ALL'|'MEETS_ANY',
                    'Conditions': [
                        {
                            'ActionCondition': {
                                'Action': 'ALLOW'|'BLOCK'|'COUNT'|'CAPTCHA'|'CHALLENGE'|'EXCLUDED_AS_COUNT'
                            },
                            'LabelNameCondition': {
                                'LabelName': 'string'
                            }
                        },
                    ]
                },
            ],
            'DefaultBehavior': 'KEEP'|'DROP'
        }
    }
}

Response Structure

  • (dict) --

    • LoggingConfiguration (dict) --

      • ResourceArn (string) --

        The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs.

      • LogDestinationConfigs (list) --

        The logging destination configuration that you want to associate with the web ACL.

        • (string) --

      • RedactedFields (list) --

        The parts of the request that you want to keep out of the logs. For example, if you redact the SingleHeader field, the HEADER field in the logs will be xxx.

        • (dict) --

          The part of the web request that you want 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" } }

          • SingleHeader (dict) --

            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.

            • Name (string) --

              The name of the query header to inspect.

          • SingleQueryArgument (dict) --

            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" }

            • Name (string) --

              The name of the query argument to inspect.

          • AllQueryArguments (dict) --

            Inspect all query arguments.

          • UriPath (dict) --

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

          • QueryString (dict) --

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

          • Body (dict) --

            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.

            Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the Body object configuration.

            • OversizeHandling (string) --

              What WAF should do if the body is larger than WAF can inspect. WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.

              The options for oversize handling are the following:

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

              • MATCH - Treat the web request as matching the rule statement. 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 8 KB.

              Default: CONTINUE

          • Method (dict) --

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

          • JsonBody (dict) --

            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.

            Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the JsonBody object configuration.

            • MatchPattern (dict) --

              The patterns to look for in the JSON body. WAF inspects the results of these pattern matches against the rule inspection criteria.

              • All (dict) --

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

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

              • IncludedPaths (list) --

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

                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.

                • (string) --

            • MatchScope (string) --

              The parts of the JSON to match against using the MatchPattern. If you specify All, WAF matches against keys and values.

            • InvalidFallbackBehavior (string) --

              What 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. 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. 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, WAF parses and evaluates the content only up to the first parsing failure that it encounters.

              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.

              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"}

            • OversizeHandling (string) --

              What WAF should do if the body is larger than WAF can inspect. WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to WAF by the underlying host service.

              The options for oversize handling are the following:

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

              • MATCH - Treat the web request as matching the rule statement. 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 8 KB.

              Default: CONTINUE

          • Headers (dict) --

            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 WAF inspects.

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

            • MatchPattern (dict) --

              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"} }

              • All (dict) --

                Inspect all headers.

              • IncludedHeaders (list) --

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

                • (string) --

              • ExcludedHeaders (list) --

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

                • (string) --

            • MatchScope (string) --

              The parts of the headers to match with the rule inspection criteria. If you specify All, WAF inspects both keys and values.

            • OversizeHandling (string) --

              What WAF should do if the headers of the request are larger than WAF can inspect. 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 WAF.

              The options for oversize handling are the following:

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

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

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

          • Cookies (dict) --

            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 WAF inspects.

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

            • MatchPattern (dict) --

              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"} }

              • All (dict) --

                Inspect all cookies.

              • IncludedCookies (list) --

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

                • (string) --

              • ExcludedCookies (list) --

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

                • (string) --

            • MatchScope (string) --

              The parts of the cookies to inspect with the rule inspection criteria. If you specify All, WAF inspects both keys and values.

            • OversizeHandling (string) --

              What WAF should do if the cookies of the request are larger than WAF can inspect. 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 WAF.

              The options for oversize handling are the following:

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

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

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

      • ManagedByFirewallManager (boolean) --

        Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.

      • LoggingFilter (dict) --

        Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.

        • Filters (list) --

          The filters that you want to apply to the logs.

          • (dict) --

            A single logging filter, used in LoggingFilter.

            • Behavior (string) --

              How to handle logs that satisfy the filter's conditions and requirement.

            • Requirement (string) --

              Logic to apply to the filtering conditions. You can specify that, in order to satisfy the filter, a log must match all conditions or must match at least one condition.

            • Conditions (list) --

              Match conditions for the filter.

              • (dict) --

                A single match condition for a Filter.

                • ActionCondition (dict) --

                  A single action condition. This is the action setting that a log record must contain in order to meet the condition.

                  • Action (string) --

                    The action setting that a log record must contain in order to meet the condition. This is the action that WAF applied to the web request.

                    For rule groups, this is either the configured rule action setting, or if you've applied a rule action override to the rule, it's the override action. The value EXCLUDED_AS_COUNT matches on excluded rules and also on rules that have a rule action override of Count.

                • LabelNameCondition (dict) --

                  A single label name condition. This is the fully qualified label name that a log record must contain in order to meet the condition. 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.

                  • LabelName (string) --

                    The label name that a log record must contain in order to meet the condition. This must be a fully qualified label name. 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.

        • DefaultBehavior (string) --

          Default handling for logs that don't match any of the specified filtering conditions.

UpdateRuleGroup (updated) Link ¶
Changes (request)
{'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                 'Value': 'string'}]}}},
           'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
           'Statement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                           '| '
                                                                                                                                           'TARGETED'}},
                                                       'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}},
                                                                                                'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                             'ResponseCode': 'integer',
                                                                                                                             'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                  'Value': 'string'}]}},
                                                                                                'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}}},
                                                                                'Name': 'string'}]},
                         'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                  'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                               'ResponseCode': 'integer',
                                                                                                                               'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                    'Value': 'string'}]}},
                                                                                                  'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                  'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                             'Value': 'string'}]}},
                                                                                                  'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}}},
                                                                                  'Name': 'string'}]}}}}

Updates the specified RuleGroup.

When you make changes to web ACLs or web ACL components, like rules and rule groups, WAF propagates the changes everywhere that the web ACL and its components are stored and used. Your changes are applied within seconds, but there might be a brief period of inconsistency when the changes have arrived in some places and not in others. So, for example, if you change a rule action setting, the action might be the old action in one area and the new action in another area. Or if you add an IP address to an IP set used in a blocking rule, the new address might briefly be blocked in one area while still allowed in another. This temporary inconsistency can occur when you first associate a web ACL with an Amazon Web Services resource and when you change a web ACL that is already associated with a resource. Generally, any inconsistencies of this type last only a few seconds.

A rule group defines a collection of rules to inspect and control web requests that you can use in a WebACL. When you create a rule group, you define an immutable capacity limit. If you update a rule group, you must stay within the capacity. This allows others to reuse the rule group with confidence in its capacity requirements.

See also: AWS API Documentation

Request Syntax

client.update_rule_group(
    Name='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    Id='string',
    Description='string',
    Rules=[
        {
            'Name': 'string',
            'Priority': 123,
            'Statement': {
                'ByteMatchStatement': {
                    'SearchString': b'bytes',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'PositionalConstraint': 'EXACTLY'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CONTAINS_WORD'
                },
                'SqliMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'SensitivityLevel': 'LOW'|'HIGH'
                },
                'XssMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'SizeConstraintStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'ComparisonOperator': 'EQ'|'NE'|'LE'|'LT'|'GE'|'GT',
                    'Size': 123,
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'GeoMatchStatement': {
                    'CountryCodes': [
                        'AF'|'AX'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BQ'|'BA'|'BW'|'BV'|'BR'|'IO'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CG'|'CD'|'CK'|'CR'|'CI'|'HR'|'CU'|'CW'|'CY'|'CZ'|'DK'|'DJ'|'DM'|'DO'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'GF'|'PF'|'TF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GP'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HM'|'VA'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KP'|'KR'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MQ'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'NF'|'MP'|'NO'|'OM'|'PK'|'PW'|'PS'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'GS'|'SS'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TL'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'UG'|'UA'|'AE'|'GB'|'US'|'UM'|'UY'|'UZ'|'VU'|'VE'|'VN'|'VG'|'VI'|'WF'|'EH'|'YE'|'ZM'|'ZW'|'XK',
                    ],
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'RuleGroupReferenceStatement': {
                    'ARN': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'IPSetReferenceStatement': {
                    'ARN': 'string',
                    'IPSetForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH',
                        'Position': 'FIRST'|'LAST'|'ANY'
                    }
                },
                'RegexPatternSetReferenceStatement': {
                    'ARN': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'RateBasedStatement': {
                    'Limit': 123,
                    'AggregateKeyType': 'IP'|'FORWARDED_IP',
                    'ScopeDownStatement': {'... recursive ...'},
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'AndStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'OrStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'NotStatement': {
                    'Statement': {'... recursive ...'}
                },
                'ManagedRuleGroupStatement': {
                    'VendorName': 'string',
                    'Name': 'string',
                    'Version': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'ScopeDownStatement': {'... recursive ...'},
                    'ManagedRuleGroupConfigs': [
                        {
                            'LoginPath': 'string',
                            'PayloadType': 'JSON'|'FORM_ENCODED',
                            'UsernameField': {
                                'Identifier': 'string'
                            },
                            'PasswordField': {
                                'Identifier': 'string'
                            },
                            'AWSManagedRulesBotControlRuleSet': {
                                'InspectionLevel': 'COMMON'|'TARGETED'
                            }
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'LabelMatchStatement': {
                    'Scope': 'LABEL'|'NAMESPACE',
                    'Key': 'string'
                },
                'RegexMatchStatement': {
                    'RegexString': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                }
            },
            'Action': {
                'Block': {
                    'CustomResponse': {
                        'ResponseCode': 123,
                        'CustomResponseBodyKey': 'string',
                        'ResponseHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Allow': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Captcha': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Challenge': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                }
            },
            'OverrideAction': {
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'None': {}

            },
            'RuleLabels': [
                {
                    'Name': 'string'
                },
            ],
            'VisibilityConfig': {
                'SampledRequestsEnabled': True|False,
                'CloudWatchMetricsEnabled': True|False,
                'MetricName': 'string'
            },
            'CaptchaConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            },
            'ChallengeConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            }
        },
    ],
    VisibilityConfig={
        'SampledRequestsEnabled': True|False,
        'CloudWatchMetricsEnabled': True|False,
        'MetricName': 'string'
    },
    LockToken='string',
    CustomResponseBodies={
        'string': {
            'ContentType': 'TEXT_PLAIN'|'TEXT_HTML'|'APPLICATION_JSON',
            'Content': 'string'
        }
    }
)


  **Parameters**
  ::

      # This section is too large to render.
      # Please see the AWS API Documentation linked below.

  `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup>`_
rtype:

dict

returns:

Response Syntax

{
    'NextLockToken': 'string'
}

Response Structure

  • (dict) --

    • NextLockToken (string) --

      A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.

UpdateWebACL (updated) Link ¶
Changes (request)
{'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
 'Rules': {'Action': {'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                 'Value': 'string'}]}}},
           'ChallengeConfig': {'ImmunityTimeProperty': {'ImmunityTime': 'long'}},
           'Statement': {'ManagedRuleGroupStatement': {'ManagedRuleGroupConfigs': {'AWSManagedRulesBotControlRuleSet': {'InspectionLevel': 'COMMON '
                                                                                                                                           '| '
                                                                                                                                           'TARGETED'}},
                                                       'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}},
                                                                                                'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                             'ResponseCode': 'integer',
                                                                                                                             'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                  'Value': 'string'}]}},
                                                                                                'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                       'Value': 'string'}]}}},
                                                                                'Name': 'string'}]},
                         'RuleGroupReferenceStatement': {'RuleActionOverrides': [{'ActionToUse': {'Allow': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}},
                                                                                                  'Block': {'CustomResponse': {'CustomResponseBodyKey': 'string',
                                                                                                                               'ResponseCode': 'integer',
                                                                                                                               'ResponseHeaders': [{'Name': 'string',
                                                                                                                                                    'Value': 'string'}]}},
                                                                                                  'Captcha': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                           'Value': 'string'}]}},
                                                                                                  'Challenge': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                             'Value': 'string'}]}},
                                                                                                  'Count': {'CustomRequestHandling': {'InsertHeaders': [{'Name': 'string',
                                                                                                                                                         'Value': 'string'}]}}},
                                                                                  'Name': 'string'}]}}},
 'TokenDomains': ['string']}

Updates the specified WebACL. While updating a web ACL, WAF provides continuous coverage to the resources that you have associated with the web ACL.

When you make changes to web ACLs or web ACL components, like rules and rule groups, WAF propagates the changes everywhere that the web ACL and its components are stored and used. Your changes are applied within seconds, but there might be a brief period of inconsistency when the changes have arrived in some places and not in others. So, for example, if you change a rule action setting, the action might be the old action in one area and the new action in another area. Or if you add an IP address to an IP set used in a blocking rule, the new address might briefly be blocked in one area while still allowed in another. This temporary inconsistency can occur when you first associate a web ACL with an Amazon Web Services resource and when you change a web ACL that is already associated with a resource. Generally, any inconsistencies of this type last only a few seconds.

A web ACL defines 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 assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types Rule, RuleGroup, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resources can be an Amazon CloudFront distribution, an Amazon API Gateway REST API, an Application Load Balancer, an AppSync GraphQL API, or an Amazon Cognito user pool.

See also: AWS API Documentation

Request Syntax

client.update_web_acl(
    Name='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    Id='string',
    DefaultAction={
        'Block': {
            'CustomResponse': {
                'ResponseCode': 123,
                'CustomResponseBodyKey': 'string',
                'ResponseHeaders': [
                    {
                        'Name': 'string',
                        'Value': 'string'
                    },
                ]
            }
        },
        'Allow': {
            'CustomRequestHandling': {
                'InsertHeaders': [
                    {
                        'Name': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
    },
    Description='string',
    Rules=[
        {
            'Name': 'string',
            'Priority': 123,
            'Statement': {
                'ByteMatchStatement': {
                    'SearchString': b'bytes',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'PositionalConstraint': 'EXACTLY'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'CONTAINS_WORD'
                },
                'SqliMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ],
                    'SensitivityLevel': 'LOW'|'HIGH'
                },
                'XssMatchStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'SizeConstraintStatement': {
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'ComparisonOperator': 'EQ'|'NE'|'LE'|'LT'|'GE'|'GT',
                    'Size': 123,
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'GeoMatchStatement': {
                    'CountryCodes': [
                        'AF'|'AX'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BQ'|'BA'|'BW'|'BV'|'BR'|'IO'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CG'|'CD'|'CK'|'CR'|'CI'|'HR'|'CU'|'CW'|'CY'|'CZ'|'DK'|'DJ'|'DM'|'DO'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'GF'|'PF'|'TF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GP'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HM'|'VA'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KP'|'KR'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MQ'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'NF'|'MP'|'NO'|'OM'|'PK'|'PW'|'PS'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'GS'|'SS'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TL'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'UG'|'UA'|'AE'|'GB'|'US'|'UM'|'UY'|'UZ'|'VU'|'VE'|'VN'|'VG'|'VI'|'WF'|'EH'|'YE'|'ZM'|'ZW'|'XK',
                    ],
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'RuleGroupReferenceStatement': {
                    'ARN': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'IPSetReferenceStatement': {
                    'ARN': 'string',
                    'IPSetForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH',
                        'Position': 'FIRST'|'LAST'|'ANY'
                    }
                },
                'RegexPatternSetReferenceStatement': {
                    'ARN': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                },
                'RateBasedStatement': {
                    'Limit': 123,
                    'AggregateKeyType': 'IP'|'FORWARDED_IP',
                    'ScopeDownStatement': {'... recursive ...'},
                    'ForwardedIPConfig': {
                        'HeaderName': 'string',
                        'FallbackBehavior': 'MATCH'|'NO_MATCH'
                    }
                },
                'AndStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'OrStatement': {
                    'Statements': [
                        {'... recursive ...'},
                    ]
                },
                'NotStatement': {
                    'Statement': {'... recursive ...'}
                },
                'ManagedRuleGroupStatement': {
                    'VendorName': 'string',
                    'Name': 'string',
                    'Version': 'string',
                    'ExcludedRules': [
                        {
                            'Name': 'string'
                        },
                    ],
                    'ScopeDownStatement': {'... recursive ...'},
                    'ManagedRuleGroupConfigs': [
                        {
                            'LoginPath': 'string',
                            'PayloadType': 'JSON'|'FORM_ENCODED',
                            'UsernameField': {
                                'Identifier': 'string'
                            },
                            'PasswordField': {
                                'Identifier': 'string'
                            },
                            'AWSManagedRulesBotControlRuleSet': {
                                'InspectionLevel': 'COMMON'|'TARGETED'
                            }
                        },
                    ],
                    'RuleActionOverrides': [
                        {
                            'Name': 'string',
                            'ActionToUse': {
                                'Block': {
                                    'CustomResponse': {
                                        'ResponseCode': 123,
                                        'CustomResponseBodyKey': 'string',
                                        'ResponseHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Allow': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Count': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Captcha': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                },
                                'Challenge': {
                                    'CustomRequestHandling': {
                                        'InsertHeaders': [
                                            {
                                                'Name': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                    ]
                },
                'LabelMatchStatement': {
                    'Scope': 'LABEL'|'NAMESPACE',
                    'Key': 'string'
                },
                'RegexMatchStatement': {
                    'RegexString': 'string',
                    'FieldToMatch': {
                        'SingleHeader': {
                            'Name': 'string'
                        },
                        'SingleQueryArgument': {
                            'Name': 'string'
                        },
                        'AllQueryArguments': {}
                        ,
                        'UriPath': {}
                        ,
                        'QueryString': {}
                        ,
                        'Body': {
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Method': {}
                        ,
                        'JsonBody': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedPaths': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'InvalidFallbackBehavior': 'MATCH'|'NO_MATCH'|'EVALUATE_AS_STRING',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Headers': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedHeaders': [
                                    'string',
                                ],
                                'ExcludedHeaders': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        },
                        'Cookies': {
                            'MatchPattern': {
                                'All': {}
                                ,
                                'IncludedCookies': [
                                    'string',
                                ],
                                'ExcludedCookies': [
                                    'string',
                                ]
                            },
                            'MatchScope': 'ALL'|'KEY'|'VALUE',
                            'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH'
                        }
                    },
                    'TextTransformations': [
                        {
                            'Priority': 123,
                            'Type': 'NONE'|'COMPRESS_WHITE_SPACE'|'HTML_ENTITY_DECODE'|'LOWERCASE'|'CMD_LINE'|'URL_DECODE'|'BASE64_DECODE'|'HEX_DECODE'|'MD5'|'REPLACE_COMMENTS'|'ESCAPE_SEQ_DECODE'|'SQL_HEX_DECODE'|'CSS_DECODE'|'JS_DECODE'|'NORMALIZE_PATH'|'NORMALIZE_PATH_WIN'|'REMOVE_NULLS'|'REPLACE_NULLS'|'BASE64_DECODE_EXT'|'URL_DECODE_UNI'|'UTF8_TO_UNICODE'
                        },
                    ]
                }
            },
            'Action': {
                'Block': {
                    'CustomResponse': {
                        'ResponseCode': 123,
                        'CustomResponseBodyKey': 'string',
                        'ResponseHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Allow': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Captcha': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'Challenge': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                }
            },
            'OverrideAction': {
                'Count': {
                    'CustomRequestHandling': {
                        'InsertHeaders': [
                            {
                                'Name': 'string',
                                'Value': 'string'
                            },
                        ]
                    }
                },
                'None': {}

            },
            'RuleLabels': [
                {
                    'Name': 'string'
                },
            ],
            'VisibilityConfig': {
                'SampledRequestsEnabled': True|False,
                'CloudWatchMetricsEnabled': True|False,
                'MetricName': 'string'
            },
            'CaptchaConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            },
            'ChallengeConfig': {
                'ImmunityTimeProperty': {
                    'ImmunityTime': 123
                }
            }
        },
    ],
    VisibilityConfig={
        'SampledRequestsEnabled': True|False,
        'CloudWatchMetricsEnabled': True|False,
        'MetricName': 'string'
    },
    LockToken='string',
    CustomResponseBodies={
        'string': {
            'ContentType': 'TEXT_PLAIN'|'TEXT_HTML'|'APPLICATION_JSON',
            'Content': 'string'
        }
    },
    CaptchaConfig={
        'ImmunityTimeProperty': {
            'ImmunityTime': 123
        }
    },
    ChallengeConfig={
        'ImmunityTimeProperty': {
            'ImmunityTime': 123
        }
    },
    TokenDomains=[
        'string',
    ]
)


  **Parameters**
  ::

      # This section is too large to render.
      # Please see the AWS API Documentation linked below.

  `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL>`_
rtype:

dict

returns:

Response Syntax

{
    'NextLockToken': 'string'
}

Response Structure

  • (dict) --

    • NextLockToken (string) --

      A token used for optimistic locking. WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken.