| 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.UpdateGeoMatchSet
Description
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
GeoMatchConstraintobject, you delete the existing object and add a new one. - The
Type. The only valid value forTypeisCountry. - The
Value, which is a two character code for the country to add to theGeoMatchConstraintobject. Valid codes are listed in 'GeoMatchConstraint$Value' .
To create and configure an GeoMatchSet , perform the following steps:
- Submit a
CreateGeoMatchSetrequest. - Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of anUpdateGeoMatchSetrequest. - Submit an
UpdateGeoMatchSetrequest 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
Arguments
| :: 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- TheGeoMatchSetIdof theGeoMatchSetthat you want to update.GeoMatchSetIdis returned byCreateGeoMatchSetand byListGeoMatchSets.ugmsChangeToken- The value returned by the most recent call toGetChangeToken.ugmsUpdates- An array ofGeoMatchSetUpdateobjects that you want to insert into or delete from anGeoMatchSet. For more information, see the applicable data types: *GeoMatchSetUpdate: ContainsActionandGeoMatchConstraint*GeoMatchConstraint: ContainsTypeandValueYou can have only oneTypeandValueperGeoMatchConstraint. To add multiple countries, include multipleGeoMatchSetUpdateobjects 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 #
Arguments
| :: Int | |
| -> UpdateGeoMatchSetResponse |
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- TheChangeTokenthat you used to submit theUpdateGeoMatchSetrequest. 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.