amazonka-waf-regional-1.5.0: Amazon WAF Regional SDK.

Copyright(c) 2013-2017 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.WAFRegional.CreateWebACL

Contents

Description

Creates a WebACL , which contains the Rules that identify the CloudFront web requests that you want to allow, block, or count. AWS WAF evaluates Rules in order based on the value of Priority for each Rule .

You also specify a default action, either ALLOW or BLOCK . If a web request doesn't match any of the Rules in a WebACL , AWS WAF responds to the request with the default action.

To create and configure a WebACL , perform the following steps:

  • Create and update the ByteMatchSet objects and other predicates that you want to include in Rules . For more information, see CreateByteMatchSet , UpdateByteMatchSet , CreateIPSet , UpdateIPSet , CreateSqlInjectionMatchSet , and UpdateSqlInjectionMatchSet .
  • Create and update the Rules that you want to include in the WebACL . For more information, see CreateRule and UpdateRule .
  • Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateWebACL request.
  • Submit a CreateWebACL request.
  • Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateWebACL request.
  • Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL , to specify the default action, and to associate the WebACL with a CloudFront distribution.

For more information about how to use the AWS WAF API, see the AWS WAF Developer Guide .

Synopsis

Creating a Request

createWebACL Source #

Creates a value of CreateWebACL with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • cwaName - A friendly name or description of the WebACL . You can't change Name after you create the WebACL .
  • cwaMetricName - A friendly name or description for the metrics for this WebACL . The name can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change MetricName after you create the WebACL .
  • cwaDefaultAction - The action that you want AWS WAF to take when a request doesn't match the criteria specified in any of the Rule objects that are associated with the WebACL .
  • cwaChangeToken - The value returned by the most recent call to GetChangeToken .

data CreateWebACL Source #

See: createWebACL smart constructor.

Instances

Eq CreateWebACL Source # 
Data CreateWebACL Source # 

Methods

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

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

toConstr :: CreateWebACL -> Constr #

dataTypeOf :: CreateWebACL -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateWebACL Source # 
Show CreateWebACL Source # 
Generic CreateWebACL Source # 

Associated Types

type Rep CreateWebACL :: * -> * #

Hashable CreateWebACL Source # 
ToJSON CreateWebACL Source # 
NFData CreateWebACL Source # 

Methods

rnf :: CreateWebACL -> () #

AWSRequest CreateWebACL Source # 
ToQuery CreateWebACL Source # 
ToPath CreateWebACL Source # 
ToHeaders CreateWebACL Source # 
type Rep CreateWebACL Source # 
type Rep CreateWebACL = D1 (MetaData "CreateWebACL" "Network.AWS.WAFRegional.CreateWebACL" "amazonka-waf-regional-1.5.0-Kn8HIfa7qWEERHHaTClrk5" False) (C1 (MetaCons "CreateWebACL'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_cwaName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_cwaMetricName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "_cwaDefaultAction") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 WafAction)) (S1 (MetaSel (Just Symbol "_cwaChangeToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs CreateWebACL Source # 

Request Lenses

cwaName :: Lens' CreateWebACL Text Source #

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

cwaMetricName :: Lens' CreateWebACL Text Source #

A friendly name or description for the metrics for this WebACL . The name can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change MetricName after you create the WebACL .

cwaDefaultAction :: Lens' CreateWebACL WafAction Source #

The action that you want AWS WAF to take when a request doesn't match the criteria specified in any of the Rule objects that are associated with the WebACL .

cwaChangeToken :: Lens' CreateWebACL Text Source #

The value returned by the most recent call to GetChangeToken .

Destructuring the Response

createWebACLResponse Source #

Creates a value of CreateWebACLResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • cwarsWebACL - The WebACL returned in the CreateWebACL response.
  • cwarsChangeToken - The ChangeToken that you used to submit the CreateWebACL request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus .
  • cwarsResponseStatus - -- | The response status code.

data CreateWebACLResponse Source #

See: createWebACLResponse smart constructor.

Instances

Eq CreateWebACLResponse Source # 
Data CreateWebACLResponse Source # 

Methods

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

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

toConstr :: CreateWebACLResponse -> Constr #

dataTypeOf :: CreateWebACLResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateWebACLResponse Source # 
Show CreateWebACLResponse Source # 
Generic CreateWebACLResponse Source # 
NFData CreateWebACLResponse Source # 

Methods

rnf :: CreateWebACLResponse -> () #

type Rep CreateWebACLResponse Source # 
type Rep CreateWebACLResponse = D1 (MetaData "CreateWebACLResponse" "Network.AWS.WAFRegional.CreateWebACL" "amazonka-waf-regional-1.5.0-Kn8HIfa7qWEERHHaTClrk5" False) (C1 (MetaCons "CreateWebACLResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cwarsWebACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe WebACL))) ((:*:) (S1 (MetaSel (Just Symbol "_cwarsChangeToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_cwarsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

cwarsWebACL :: Lens' CreateWebACLResponse (Maybe WebACL) Source #

The WebACL returned in the CreateWebACL response.

cwarsChangeToken :: Lens' CreateWebACLResponse (Maybe Text) Source #

The ChangeToken that you used to submit the CreateWebACL request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus .

cwarsResponseStatus :: Lens' CreateWebACLResponse Int Source #

  • - | The response status code.