amazonka-waf-1.6.1: 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.CreateByteMatchSet

Contents

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

Creating a Request

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

data CreateByteMatchSet #

See: createByteMatchSet smart constructor.

Instances
Eq CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Data CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Methods

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

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

toConstr :: CreateByteMatchSet -> Constr #

dataTypeOf :: CreateByteMatchSet -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Show CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Generic CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Associated Types

type Rep CreateByteMatchSet :: Type -> Type #

Hashable CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

ToJSON CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

AWSRequest CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Associated Types

type Rs CreateByteMatchSet :: Type #

ToHeaders CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

ToPath CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

ToQuery CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

NFData CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Methods

rnf :: CreateByteMatchSet -> () #

type Rep CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

type Rep CreateByteMatchSet = D1 (MetaData "CreateByteMatchSet" "Network.AWS.WAF.CreateByteMatchSet" "amazonka-waf-1.6.1-58qiOW5VcwnIkfAeSj6srS" False) (C1 (MetaCons "CreateByteMatchSet'" PrefixI True) (S1 (MetaSel (Just "_cbmsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_cbmsChangeToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))
type Rs CreateByteMatchSet # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Request Lenses

cbmsName :: Lens' CreateByteMatchSet Text #

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

cbmsChangeToken :: Lens' CreateByteMatchSet Text #

The value returned by the most recent call to GetChangeToken .

Destructuring the Response

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:

data CreateByteMatchSetResponse #

See: createByteMatchSetResponse smart constructor.

Instances
Eq CreateByteMatchSetResponse # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Data CreateByteMatchSetResponse # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Methods

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

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

toConstr :: CreateByteMatchSetResponse -> Constr #

dataTypeOf :: CreateByteMatchSetResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateByteMatchSetResponse # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Show CreateByteMatchSetResponse # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Generic CreateByteMatchSetResponse # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

Associated Types

type Rep CreateByteMatchSetResponse :: Type -> Type #

NFData CreateByteMatchSetResponse # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

type Rep CreateByteMatchSetResponse # 
Instance details

Defined in Network.AWS.WAF.CreateByteMatchSet

type Rep CreateByteMatchSetResponse = D1 (MetaData "CreateByteMatchSetResponse" "Network.AWS.WAF.CreateByteMatchSet" "amazonka-waf-1.6.1-58qiOW5VcwnIkfAeSj6srS" False) (C1 (MetaCons "CreateByteMatchSetResponse'" PrefixI True) (S1 (MetaSel (Just "_cbmsrsByteMatchSet") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ByteMatchSet)) :*: (S1 (MetaSel (Just "_cbmsrsChangeToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_cbmsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

cbmsrsByteMatchSet :: Lens' CreateByteMatchSetResponse (Maybe ByteMatchSet) #

A ByteMatchSet that contains no ByteMatchTuple objects.

cbmsrsChangeToken :: Lens' CreateByteMatchSetResponse (Maybe Text) #

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 .