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
RegexPatternString
objects in a RegexPatternSet. For eachRegexPatternString
object, 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
RegexPatternString
such asB[a@]dB[o0]t
. AWS WAF will match thisRegexPatternString
to: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
ChangeToken
parameter of anUpdateRegexPatternSet
request.Submit an
UpdateRegexPatternSet
request 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
RegexPatternSetId
of the RegexPatternSet that you want to update.RegexPatternSetId
is returned by CreateRegexPatternSet and by ListRegexPatternSets.Updates (list) –
[REQUIRED]
An array of
RegexPatternSetUpdate
objects 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,
RegexPatternSetUpdate
specifies whether to insert or delete aRegexPatternString
and 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
ChangeToken
that you used to submit theUpdateRegexPatternSet
request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.
Exceptions
WAF.Client.exceptions.WAFStaleDataException
WAF.Client.exceptions.WAFInternalErrorException
WAF.Client.exceptions.WAFLimitsExceededException
WAF.Client.exceptions.WAFNonexistentItemException
WAF.Client.exceptions.WAFNonexistentContainerException
WAF.Client.exceptions.WAFInvalidOperationException
WAF.Client.exceptions.WAFInvalidAccountException
WAF.Client.exceptions.WAFInvalidRegexPatternException