WAF / Client / update_regex_pattern_set
update_regex_pattern_set¶
- WAF.Client.update_regex_pattern_set(**kwargs)¶
Note
This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.
Inserts or deletes
RegexPatternStringobjects in a RegexPatternSet. For eachRegexPatternStringobject, you specify the following values:Whether to insert or delete the
RegexPatternString.The regular expression pattern that you want to insert or delete. For more information, see RegexPatternSet.
For example, you can create a
RegexPatternStringsuch asB[a@]dB[o0]t. AWS WAF will match thisRegexPatternStringto:To create and configure a
RegexPatternSet, perform the following steps:Create a
RegexPatternSet.For more information, see CreateRegexPatternSet.Use GetChangeToken to get the change token that you provide in the
ChangeTokenparameter of anUpdateRegexPatternSetrequest.Submit an
UpdateRegexPatternSetrequest to specify the regular expression pattern that you want AWS WAF to watch for.
For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide.
See also: AWS API Documentation
Request Syntax
response = client.update_regex_pattern_set( RegexPatternSetId='string', Updates=[ { 'Action': 'INSERT'|'DELETE', 'RegexPatternString': 'string' }, ], ChangeToken='string' )
- Parameters:
RegexPatternSetId (string) –
[REQUIRED]
The
RegexPatternSetIdof the RegexPatternSet that you want to update.RegexPatternSetIdis returned by CreateRegexPatternSet and by ListRegexPatternSets.Updates (list) –
[REQUIRED]
An array of
RegexPatternSetUpdateobjects that you want to insert into or delete from a RegexPatternSet.(dict) –
Note
This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.
In an UpdateRegexPatternSet request,
RegexPatternSetUpdatespecifies whether to insert or delete aRegexPatternStringand includes the settings for theRegexPatternString.Action (string) – [REQUIRED]
Specifies whether to insert or delete a
RegexPatternString.RegexPatternString (string) – [REQUIRED]
Specifies the regular expression (regex) pattern that you want AWS WAF to search for, such as
B[a@]dB[o0]t.
ChangeToken (string) –
[REQUIRED]
The value returned by the most recent call to GetChangeToken.
- Return type:
dict
- Returns:
Response Syntax
{ 'ChangeToken': 'string' }
Response Structure
(dict) –
ChangeToken (string) –
The
ChangeTokenthat you used to submit theUpdateRegexPatternSetrequest. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.
Exceptions
WAF.Client.exceptions.WAFStaleDataExceptionWAF.Client.exceptions.WAFInternalErrorExceptionWAF.Client.exceptions.WAFLimitsExceededExceptionWAF.Client.exceptions.WAFNonexistentItemExceptionWAF.Client.exceptions.WAFNonexistentContainerExceptionWAF.Client.exceptions.WAFInvalidOperationExceptionWAF.Client.exceptions.WAFInvalidAccountExceptionWAF.Client.exceptions.WAFInvalidRegexPatternException