| 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.CreateByteMatchSet
Description
Creates a ByteMatchSet . You then use UpdateByteMatchSet 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 ByteMatchSet that matches any requests with User-Agent headers that contain the string BadBot . You can then configure AWS WAF to reject those requests.
To create and configure a ByteMatchSet , perform the following steps:
- Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of aCreateByteMatchSetrequest. - Submit a
CreateByteMatchSetrequest. - Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of anUpdateByteMatchSetrequest. - Submit an
UpdateByteMatchSetrequest to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI) and the value 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
- createByteMatchSet :: Text -> Text -> CreateByteMatchSet
- data CreateByteMatchSet
- cbmsName :: Lens' CreateByteMatchSet Text
- cbmsChangeToken :: Lens' CreateByteMatchSet Text
- createByteMatchSetResponse :: Int -> CreateByteMatchSetResponse
- data CreateByteMatchSetResponse
- cbmsrsByteMatchSet :: Lens' CreateByteMatchSetResponse (Maybe ByteMatchSet)
- cbmsrsChangeToken :: Lens' CreateByteMatchSetResponse (Maybe Text)
- cbmsrsResponseStatus :: Lens' CreateByteMatchSetResponse Int
Creating a Request
Arguments
| :: Text | |
| -> Text | |
| -> CreateByteMatchSet |
Creates a value of CreateByteMatchSet with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cbmsName- A friendly name or description of theByteMatchSet. You can't changeNameafter you create aByteMatchSet.cbmsChangeToken- The value returned by the most recent call toGetChangeToken.
data CreateByteMatchSet Source #
See: createByteMatchSet smart constructor.
Instances
Request Lenses
cbmsName :: Lens' CreateByteMatchSet Text Source #
A friendly name or description of the ByteMatchSet . You can't change Name after you create a ByteMatchSet .
cbmsChangeToken :: Lens' CreateByteMatchSet Text Source #
The value returned by the most recent call to GetChangeToken .
Destructuring the Response
createByteMatchSetResponse Source #
Arguments
| :: Int | |
| -> CreateByteMatchSetResponse |
Creates a value of CreateByteMatchSetResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cbmsrsByteMatchSet- AByteMatchSetthat contains noByteMatchTupleobjects.cbmsrsChangeToken- TheChangeTokenthat you used to submit theCreateByteMatchSetrequest. You can also use this value to query the status of the request. For more information, seeGetChangeTokenStatus.cbmsrsResponseStatus- -- | The response status code.
data CreateByteMatchSetResponse Source #
See: createByteMatchSetResponse smart constructor.
Instances
Response Lenses
cbmsrsByteMatchSet :: Lens' CreateByteMatchSetResponse (Maybe ByteMatchSet) Source #
A ByteMatchSet that contains no ByteMatchTuple objects.
cbmsrsChangeToken :: Lens' CreateByteMatchSetResponse (Maybe Text) Source #
The ChangeToken that you used to submit the CreateByteMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus .
cbmsrsResponseStatus :: Lens' CreateByteMatchSetResponse Int Source #
- - | The response status code.