| 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.CreateRegexMatchSet
Description
Creates a RegexMatchSet . You then use UpdateRegexMatchSet to identify the part of a web request that you want AWS WAF to inspect, such as the values of the User-Agent header or the query string. For example, you can create a RegexMatchSet that contains a RegexMatchTuple that looks for any requests with User-Agent headers that match a RegexPatternSet with pattern 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:
- Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of aCreateRegexMatchSetrequest. - Submit a
CreateRegexMatchSetrequest. - 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 value, using aRegexPatternSet, 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 .
Synopsis
- createRegexMatchSet :: Text -> Text -> CreateRegexMatchSet
- data CreateRegexMatchSet
- crmsName :: Lens' CreateRegexMatchSet Text
- crmsChangeToken :: Lens' CreateRegexMatchSet Text
- createRegexMatchSetResponse :: Int -> CreateRegexMatchSetResponse
- data CreateRegexMatchSetResponse
- crmsrsRegexMatchSet :: Lens' CreateRegexMatchSetResponse (Maybe RegexMatchSet)
- crmsrsChangeToken :: Lens' CreateRegexMatchSetResponse (Maybe Text)
- crmsrsResponseStatus :: Lens' CreateRegexMatchSetResponse Int
Creating a Request
Arguments
| :: Text | |
| -> Text | |
| -> CreateRegexMatchSet |
Creates a value of CreateRegexMatchSet with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
crmsName- A friendly name or description of theRegexMatchSet. You can't changeNameafter you create aRegexMatchSet.crmsChangeToken- The value returned by the most recent call toGetChangeToken.
data CreateRegexMatchSet Source #
See: createRegexMatchSet smart constructor.
Instances
Request Lenses
crmsName :: Lens' CreateRegexMatchSet Text Source #
A friendly name or description of the RegexMatchSet . You can't change Name after you create a RegexMatchSet .
crmsChangeToken :: Lens' CreateRegexMatchSet Text Source #
The value returned by the most recent call to GetChangeToken .
Destructuring the Response
createRegexMatchSetResponse Source #
Arguments
| :: Int | |
| -> CreateRegexMatchSetResponse |
Creates a value of CreateRegexMatchSetResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
crmsrsRegexMatchSet- ARegexMatchSetthat contains noRegexMatchTupleobjects.crmsrsChangeToken- TheChangeTokenthat you used to submit theCreateRegexMatchSetrequest. You can also use this value to query the status of the request. For more information, seeGetChangeTokenStatus.crmsrsResponseStatus- -- | The response status code.
data CreateRegexMatchSetResponse Source #
See: createRegexMatchSetResponse smart constructor.
Instances
Response Lenses
crmsrsRegexMatchSet :: Lens' CreateRegexMatchSetResponse (Maybe RegexMatchSet) Source #
A RegexMatchSet that contains no RegexMatchTuple objects.
crmsrsChangeToken :: Lens' CreateRegexMatchSetResponse (Maybe Text) Source #
The ChangeToken that you used to submit the CreateRegexMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus .
crmsrsResponseStatus :: Lens' CreateRegexMatchSetResponse Int Source #
- - | The response status code.