Copyright | (c) 2013-2017 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 |
Creates an GeoMatchSet
, which you use to specify which web requests you want to allow or block based on the country that the requests originate from. For example, if you're receiving a lot of requests from one or more countries and you want to block the requests, you can create an GeoMatchSet
that contains those countries and then configure AWS WAF to block the requests.
To create and configure a GeoMatchSet
, perform the following steps:
- Use
GetChangeToken
to get the change token that you provide in theChangeToken
parameter of aCreateGeoMatchSet
request. - Submit a
CreateGeoMatchSet
request. - Use
GetChangeToken
to get the change token that you provide in theChangeToken
parameter of anUpdateGeoMatchSet
request. - Submit an
UpdateGeoMatchSetSet
request to specify the countries 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 .
- createGeoMatchSet :: Text -> Text -> CreateGeoMatchSet
- data CreateGeoMatchSet
- cgmsName :: Lens' CreateGeoMatchSet Text
- cgmsChangeToken :: Lens' CreateGeoMatchSet Text
- createGeoMatchSetResponse :: Int -> CreateGeoMatchSetResponse
- data CreateGeoMatchSetResponse
- cgmsrsGeoMatchSet :: Lens' CreateGeoMatchSetResponse (Maybe GeoMatchSet)
- cgmsrsChangeToken :: Lens' CreateGeoMatchSetResponse (Maybe Text)
- cgmsrsResponseStatus :: Lens' CreateGeoMatchSetResponse Int
Creating a Request
Creates a value of CreateGeoMatchSet
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cgmsName
- A friendly name or description of theGeoMatchSet
. You can't changeName
after you create theGeoMatchSet
.cgmsChangeToken
- The value returned by the most recent call toGetChangeToken
.
data CreateGeoMatchSet Source #
See: createGeoMatchSet
smart constructor.
Request Lenses
cgmsName :: Lens' CreateGeoMatchSet Text Source #
A friendly name or description of the GeoMatchSet
. You can't change Name
after you create the GeoMatchSet
.
cgmsChangeToken :: Lens' CreateGeoMatchSet Text Source #
The value returned by the most recent call to GetChangeToken
.
Destructuring the Response
createGeoMatchSetResponse Source #
Creates a value of CreateGeoMatchSetResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cgmsrsGeoMatchSet
- TheGeoMatchSet
returned in theCreateGeoMatchSet
response. TheGeoMatchSet
contains noGeoMatchConstraints
.cgmsrsChangeToken
- TheChangeToken
that you used to submit theCreateGeoMatchSet
request. You can also use this value to query the status of the request. For more information, seeGetChangeTokenStatus
.cgmsrsResponseStatus
- -- | The response status code.
data CreateGeoMatchSetResponse Source #
See: createGeoMatchSetResponse
smart constructor.
Response Lenses
cgmsrsGeoMatchSet :: Lens' CreateGeoMatchSetResponse (Maybe GeoMatchSet) Source #
The GeoMatchSet
returned in the CreateGeoMatchSet
response. The GeoMatchSet
contains no GeoMatchConstraints
.
cgmsrsChangeToken :: Lens' CreateGeoMatchSetResponse (Maybe Text) Source #
The ChangeToken
that you used to submit the CreateGeoMatchSet
request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus
.
cgmsrsResponseStatus :: Lens' CreateGeoMatchSetResponse Int Source #
- - | The response status code.