| Copyright | (c) 2013-2018 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.WAF.UpdateRegexMatchSet
Description
Inserts or deletes RegexMatchTuple objects (filters) in a RegexMatchSet . For each RegexMatchSetUpdate object, you specify the following values:
- Whether to insert or delete the object from the array. If you want to change a
RegexMatchSetUpdateobject, you delete the existing object and add a new one. - The part of a web request that you want AWS WAF to inspectupdate, such as a query string or the value of the
User-Agentheader. - The identifier of the pattern (a regular expression) that you want AWS WAF to look for. For more information, see
RegexPatternSet. - Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.
For example, you can create a RegexPatternSet that matches any requests with User-Agent headers that contain the string B[a]dB[o0]t@ . You can then configure AWS WAF to reject those requests.
To create and configure a RegexMatchSet , perform the following steps:
- Create a
RegexMatchSet.For more information, seeCreateRegexMatchSet. - Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of anUpdateRegexMatchSetrequest. - Submit an
UpdateRegexMatchSetrequest to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI) and the identifier of theRegexPatternSetthat contain the regular expression patters 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 .
Synopsis
- updateRegexMatchSet :: Text -> NonEmpty RegexMatchSetUpdate -> Text -> UpdateRegexMatchSet
- data UpdateRegexMatchSet
- urmsRegexMatchSetId :: Lens' UpdateRegexMatchSet Text
- urmsUpdates :: Lens' UpdateRegexMatchSet (NonEmpty RegexMatchSetUpdate)
- urmsChangeToken :: Lens' UpdateRegexMatchSet Text
- updateRegexMatchSetResponse :: Int -> UpdateRegexMatchSetResponse
- data UpdateRegexMatchSetResponse
- urmsrsChangeToken :: Lens' UpdateRegexMatchSetResponse (Maybe Text)
- urmsrsResponseStatus :: Lens' UpdateRegexMatchSetResponse Int
Creating a Request
Arguments
| :: Text | |
| -> NonEmpty RegexMatchSetUpdate | |
| -> Text | |
| -> UpdateRegexMatchSet |
Creates a value of UpdateRegexMatchSet with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
urmsRegexMatchSetId- TheRegexMatchSetIdof theRegexMatchSetthat you want to update.RegexMatchSetIdis returned byCreateRegexMatchSetand byListRegexMatchSets.urmsUpdates- An array ofRegexMatchSetUpdateobjects that you want to insert into or delete from aRegexMatchSet. For more information, seeRegexMatchTuple.urmsChangeToken- The value returned by the most recent call toGetChangeToken.
data UpdateRegexMatchSet Source #
See: updateRegexMatchSet smart constructor.
Instances
Request Lenses
urmsRegexMatchSetId :: Lens' UpdateRegexMatchSet Text Source #
The RegexMatchSetId of the RegexMatchSet that you want to update. RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets .
urmsUpdates :: Lens' UpdateRegexMatchSet (NonEmpty RegexMatchSetUpdate) Source #
An array of RegexMatchSetUpdate objects that you want to insert into or delete from a RegexMatchSet . For more information, see RegexMatchTuple .
urmsChangeToken :: Lens' UpdateRegexMatchSet Text Source #
The value returned by the most recent call to GetChangeToken .
Destructuring the Response
updateRegexMatchSetResponse Source #
Arguments
| :: Int | |
| -> UpdateRegexMatchSetResponse |
Creates a value of UpdateRegexMatchSetResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
urmsrsChangeToken- TheChangeTokenthat you used to submit theUpdateRegexMatchSetrequest. You can also use this value to query the status of the request. For more information, seeGetChangeTokenStatus.urmsrsResponseStatus- -- | The response status code.
data UpdateRegexMatchSetResponse Source #
See: updateRegexMatchSetResponse smart constructor.
Instances
Response Lenses
urmsrsChangeToken :: Lens' UpdateRegexMatchSetResponse (Maybe Text) Source #
The ChangeToken that you used to submit the UpdateRegexMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus .
urmsrsResponseStatus :: Lens' UpdateRegexMatchSetResponse Int Source #
- - | The response status code.