WAFV2 / Client / update_rule_group
update_rule_group#
- WAFV2.Client.update_rule_group(**kwargs)#
Updates the specified RuleGroup.
Note
This operation completely replaces the mutable specifications that you already have for the rule group with the ones that you provide to this call.
To modify a rule group, do the following:
Retrieve it by calling GetRuleGroup
Update its settings as needed
Provide the complete rule group specification to this call
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.
Temporary inconsistencies during updates
When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes.
The following are examples of the temporary inconsistencies that you might notice during change propagation:
After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable.
After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another.
After you change a rule action setting, you might see the old action in some places and the new action in others.
After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another.
See also: AWS API Documentation
Request Syntax
response = 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' }, 'HeaderOrder': { 'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH' }, 'JA3Fingerprint': { 'FallbackBehavior': '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' }, 'HeaderOrder': { 'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH' }, 'JA3Fingerprint': { 'FallbackBehavior': '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' }, 'HeaderOrder': { 'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH' }, 'JA3Fingerprint': { 'FallbackBehavior': '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' }, 'HeaderOrder': { 'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH' }, 'JA3Fingerprint': { 'FallbackBehavior': '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' }, 'HeaderOrder': { 'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH' }, 'JA3Fingerprint': { 'FallbackBehavior': '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, 'EvaluationWindowSec': 123, 'AggregateKeyType': 'IP'|'FORWARDED_IP'|'CUSTOM_KEYS'|'CONSTANT', 'ScopeDownStatement': {'... recursive ...'}, 'ForwardedIPConfig': { 'HeaderName': 'string', 'FallbackBehavior': 'MATCH'|'NO_MATCH' }, 'CustomKeys': [ { 'Header': { 'Name': 'string', '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' }, ] }, 'Cookie': { 'Name': 'string', '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' }, ] }, 'QueryArgument': { 'Name': 'string', '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' }, ] }, 'QueryString': { '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' }, ] }, 'HTTPMethod': {} , 'ForwardedIP': {} , 'IP': {} , 'LabelNamespace': { 'Namespace': 'string' }, 'UriPath': { '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' }, ] } }, ] }, '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', 'EnableMachineLearning': True|False }, 'AWSManagedRulesATPRuleSet': { 'LoginPath': 'string', 'RequestInspection': { 'PayloadType': 'JSON'|'FORM_ENCODED', 'UsernameField': { 'Identifier': 'string' }, 'PasswordField': { 'Identifier': 'string' } }, 'ResponseInspection': { 'StatusCode': { 'SuccessCodes': [ 123, ], 'FailureCodes': [ 123, ] }, 'Header': { 'Name': 'string', 'SuccessValues': [ 'string', ], 'FailureValues': [ 'string', ] }, 'BodyContains': { 'SuccessStrings': [ 'string', ], 'FailureStrings': [ 'string', ] }, 'Json': { 'Identifier': 'string', 'SuccessValues': [ 'string', ], 'FailureValues': [ 'string', ] } }, 'EnableRegexInPath': True|False }, 'AWSManagedRulesACFPRuleSet': { 'CreationPath': 'string', 'RegistrationPagePath': 'string', 'RequestInspection': { 'PayloadType': 'JSON'|'FORM_ENCODED', 'UsernameField': { 'Identifier': 'string' }, 'PasswordField': { 'Identifier': 'string' }, 'EmailField': { 'Identifier': 'string' }, 'PhoneNumberFields': [ { 'Identifier': 'string' }, ], 'AddressFields': [ { 'Identifier': 'string' }, ] }, 'ResponseInspection': { 'StatusCode': { 'SuccessCodes': [ 123, ], 'FailureCodes': [ 123, ] }, 'Header': { 'Name': 'string', 'SuccessValues': [ 'string', ], 'FailureValues': [ 'string', ] }, 'BodyContains': { 'SuccessStrings': [ 'string', ], 'FailureStrings': [ 'string', ] }, 'Json': { 'Identifier': 'string', 'SuccessValues': [ 'string', ], 'FailureValues': [ 'string', ] } }, 'EnableRegexInPath': True|False } }, ], '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' }, 'HeaderOrder': { 'OversizeHandling': 'CONTINUE'|'MATCH'|'NO_MATCH' }, 'JA3Fingerprint': { 'FallbackBehavior': '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>`_
- Return type:
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 useNextLockToken
in the same manner as you useLockToken
.
Exceptions
WAFV2.Client.exceptions.WAFInternalErrorException
WAFV2.Client.exceptions.WAFInvalidParameterException
WAFV2.Client.exceptions.WAFNonexistentItemException
WAFV2.Client.exceptions.WAFDuplicateItemException
WAFV2.Client.exceptions.WAFOptimisticLockException
WAFV2.Client.exceptions.WAFLimitsExceededException
WAFV2.Client.exceptions.WAFUnavailableEntityException
WAFV2.Client.exceptions.WAFSubscriptionNotFoundException
WAFV2.Client.exceptions.WAFInvalidOperationException
WAFV2.Client.exceptions.WAFConfigurationWarningException