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 |
Inserts or deletes GeoMatchConstraint
objects in an GeoMatchSet
. For each GeoMatchConstraint
object, you specify the following values:
- Whether to insert or delete the object from the array. If you want to change an
GeoMatchConstraint
object, you delete the existing object and add a new one. - The
Type
. The only valid value forType
isCountry
. - The
Value
, which is a two character code for the country to add to theGeoMatchConstraint
object. Valid codes are listed in 'GeoMatchConstraint$Value' .
To create and configure an GeoMatchSet
, perform the following steps:
- Submit a
CreateGeoMatchSet
request. - Use
GetChangeToken
to get the change token that you provide in theChangeToken
parameter of anUpdateGeoMatchSet
request. - Submit an
UpdateGeoMatchSet
request to specify the country that you want AWS WAF to watch for.
When you update an GeoMatchSet
, you specify the country that you want to add and/or the country that you want to delete. If you want to change a country, you delete the existing country and add the new one.
For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide .
Synopsis
- updateGeoMatchSet :: Text -> Text -> NonEmpty GeoMatchSetUpdate -> UpdateGeoMatchSet
- data UpdateGeoMatchSet
- ugmsGeoMatchSetId :: Lens' UpdateGeoMatchSet Text
- ugmsChangeToken :: Lens' UpdateGeoMatchSet Text
- ugmsUpdates :: Lens' UpdateGeoMatchSet (NonEmpty GeoMatchSetUpdate)
- updateGeoMatchSetResponse :: Int -> UpdateGeoMatchSetResponse
- data UpdateGeoMatchSetResponse
- ugmsrsChangeToken :: Lens' UpdateGeoMatchSetResponse (Maybe Text)
- ugmsrsResponseStatus :: Lens' UpdateGeoMatchSetResponse Int
Creating a Request
:: Text | |
-> Text | |
-> NonEmpty GeoMatchSetUpdate | |
-> UpdateGeoMatchSet |
Creates a value of UpdateGeoMatchSet
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ugmsGeoMatchSetId
- TheGeoMatchSetId
of theGeoMatchSet
that you want to update.GeoMatchSetId
is returned byCreateGeoMatchSet
and byListGeoMatchSets
.ugmsChangeToken
- The value returned by the most recent call toGetChangeToken
.ugmsUpdates
- An array ofGeoMatchSetUpdate
objects that you want to insert into or delete from anGeoMatchSet
. For more information, see the applicable data types: *GeoMatchSetUpdate
: ContainsAction
andGeoMatchConstraint
*GeoMatchConstraint
: ContainsType
andValue
You can have only oneType
andValue
perGeoMatchConstraint
. To add multiple countries, include multipleGeoMatchSetUpdate
objects in your request.
data UpdateGeoMatchSet Source #
See: updateGeoMatchSet
smart constructor.
Instances
Request Lenses
ugmsGeoMatchSetId :: Lens' UpdateGeoMatchSet Text Source #
The GeoMatchSetId
of the GeoMatchSet
that you want to update. GeoMatchSetId
is returned by CreateGeoMatchSet
and by ListGeoMatchSets
.
ugmsChangeToken :: Lens' UpdateGeoMatchSet Text Source #
The value returned by the most recent call to GetChangeToken
.
ugmsUpdates :: Lens' UpdateGeoMatchSet (NonEmpty GeoMatchSetUpdate) Source #
An array of GeoMatchSetUpdate
objects that you want to insert into or delete from an GeoMatchSet
. For more information, see the applicable data types: * GeoMatchSetUpdate
: Contains Action
and GeoMatchConstraint
* GeoMatchConstraint
: Contains Type
and Value
You can have only one Type
and Value
per GeoMatchConstraint
. To add multiple countries, include multiple GeoMatchSetUpdate
objects in your request.
Destructuring the Response
updateGeoMatchSetResponse Source #
Creates a value of UpdateGeoMatchSetResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ugmsrsChangeToken
- TheChangeToken
that you used to submit theUpdateGeoMatchSet
request. You can also use this value to query the status of the request. For more information, seeGetChangeTokenStatus
.ugmsrsResponseStatus
- -- | The response status code.
data UpdateGeoMatchSetResponse Source #
See: updateGeoMatchSetResponse
smart constructor.
Instances
Response Lenses
ugmsrsChangeToken :: Lens' UpdateGeoMatchSetResponse (Maybe Text) Source #
The ChangeToken
that you used to submit the UpdateGeoMatchSet
request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus
.
ugmsrsResponseStatus :: Lens' UpdateGeoMatchSetResponse Int Source #
- - | The response status code.