amazonka-waf-1.6.0: Amazon WAF SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.WAF.CreateGeoMatchSet

Contents

Description

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 the ChangeToken parameter of a CreateGeoMatchSet request.
  • Submit a CreateGeoMatchSet request.
  • Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateGeoMatchSet 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 .

Synopsis

Creating a Request

createGeoMatchSet #

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 the GeoMatchSet . You can't change Name after you create the GeoMatchSet .
  • cgmsChangeToken - The value returned by the most recent call to GetChangeToken .

data CreateGeoMatchSet #

See: createGeoMatchSet smart constructor.

Instances

Eq CreateGeoMatchSet # 
Data CreateGeoMatchSet # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateGeoMatchSet -> c CreateGeoMatchSet #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateGeoMatchSet #

toConstr :: CreateGeoMatchSet -> Constr #

dataTypeOf :: CreateGeoMatchSet -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateGeoMatchSet) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateGeoMatchSet) #

gmapT :: (forall b. Data b => b -> b) -> CreateGeoMatchSet -> CreateGeoMatchSet #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateGeoMatchSet -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateGeoMatchSet -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateGeoMatchSet -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateGeoMatchSet -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateGeoMatchSet -> m CreateGeoMatchSet #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGeoMatchSet -> m CreateGeoMatchSet #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGeoMatchSet -> m CreateGeoMatchSet #

Read CreateGeoMatchSet # 
Show CreateGeoMatchSet # 
Generic CreateGeoMatchSet # 
Hashable CreateGeoMatchSet # 
ToJSON CreateGeoMatchSet # 
NFData CreateGeoMatchSet # 

Methods

rnf :: CreateGeoMatchSet -> () #

AWSRequest CreateGeoMatchSet # 
ToHeaders CreateGeoMatchSet # 
ToPath CreateGeoMatchSet # 
ToQuery CreateGeoMatchSet # 
type Rep CreateGeoMatchSet # 
type Rep CreateGeoMatchSet = D1 * (MetaData "CreateGeoMatchSet" "Network.AWS.WAF.CreateGeoMatchSet" "amazonka-waf-1.6.0-K7okww4xWnpBRydji27mKc" False) (C1 * (MetaCons "CreateGeoMatchSet'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cgmsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cgmsChangeToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))
type Rs CreateGeoMatchSet # 

Request Lenses

cgmsName :: Lens' CreateGeoMatchSet Text #

A friendly name or description of the GeoMatchSet . You can't change Name after you create the GeoMatchSet .

cgmsChangeToken :: Lens' CreateGeoMatchSet Text #

The value returned by the most recent call to GetChangeToken .

Destructuring the Response

createGeoMatchSetResponse #

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 - The GeoMatchSet returned in the CreateGeoMatchSet response. The GeoMatchSet contains no GeoMatchConstraints .
  • cgmsrsChangeToken - 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 - -- | The response status code.

data CreateGeoMatchSetResponse #

See: createGeoMatchSetResponse smart constructor.

Instances

Eq CreateGeoMatchSetResponse # 
Data CreateGeoMatchSetResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateGeoMatchSetResponse -> c CreateGeoMatchSetResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateGeoMatchSetResponse #

toConstr :: CreateGeoMatchSetResponse -> Constr #

dataTypeOf :: CreateGeoMatchSetResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateGeoMatchSetResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateGeoMatchSetResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateGeoMatchSetResponse -> CreateGeoMatchSetResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateGeoMatchSetResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateGeoMatchSetResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateGeoMatchSetResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateGeoMatchSetResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateGeoMatchSetResponse -> m CreateGeoMatchSetResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGeoMatchSetResponse -> m CreateGeoMatchSetResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGeoMatchSetResponse -> m CreateGeoMatchSetResponse #

Read CreateGeoMatchSetResponse # 
Show CreateGeoMatchSetResponse # 
Generic CreateGeoMatchSetResponse # 
NFData CreateGeoMatchSetResponse # 
type Rep CreateGeoMatchSetResponse # 
type Rep CreateGeoMatchSetResponse = D1 * (MetaData "CreateGeoMatchSetResponse" "Network.AWS.WAF.CreateGeoMatchSet" "amazonka-waf-1.6.0-K7okww4xWnpBRydji27mKc" False) (C1 * (MetaCons "CreateGeoMatchSetResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cgmsrsGeoMatchSet") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe GeoMatchSet))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cgmsrsChangeToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_cgmsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

Response Lenses

cgmsrsGeoMatchSet :: Lens' CreateGeoMatchSetResponse (Maybe GeoMatchSet) #

The GeoMatchSet returned in the CreateGeoMatchSet response. The GeoMatchSet contains no GeoMatchConstraints .

cgmsrsChangeToken :: Lens' CreateGeoMatchSetResponse (Maybe Text) #

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 #

  • - | The response status code.