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.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 # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Data CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

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 # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Show CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Generic CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Associated Types

type Rep CreateWebACL :: Type -> Type #

Hashable CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

ToJSON CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

AWSRequest CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Associated Types

type Rs CreateWebACL :: Type #

ToHeaders CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

ToPath CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

ToQuery CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

NFData CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Methods

rnf :: CreateWebACL -> () #

type Rep CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

type Rep CreateWebACL = D1 (MetaData "CreateWebACL" "Network.AWS.WAF.CreateWebACL" "amazonka-waf-1.6.1-AAUMqlxoZ2N3dlHnZE2nzz" False) (C1 (MetaCons "CreateWebACL'" PrefixI True) ((S1 (MetaSel (Just "_cwaName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_cwaMetricName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) :*: (S1 (MetaSel (Just "_cwaDefaultAction") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 WafAction) :*: S1 (MetaSel (Just "_cwaChangeToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs CreateWebACL Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

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 # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Data CreateWebACLResponse Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

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 # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Show CreateWebACLResponse Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Generic CreateWebACLResponse Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Associated Types

type Rep CreateWebACLResponse :: Type -> Type #

NFData CreateWebACLResponse Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

Methods

rnf :: CreateWebACLResponse -> () #

type Rep CreateWebACLResponse Source # 
Instance details

Defined in Network.AWS.WAF.CreateWebACL

type Rep CreateWebACLResponse = D1 (MetaData "CreateWebACLResponse" "Network.AWS.WAF.CreateWebACL" "amazonka-waf-1.6.1-AAUMqlxoZ2N3dlHnZE2nzz" False) (C1 (MetaCons "CreateWebACLResponse'" PrefixI True) (S1 (MetaSel (Just "_cwarsWebACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe WebACL)) :*: (S1 (MetaSel (Just "_cwarsChangeToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_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.