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

Amazonka.WAF.CreateWebACL

Description

This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.

For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

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:

  1. 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.
  2. Create and update the Rules that you want to include in the WebACL. For more information, see CreateRule and UpdateRule.
  3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateWebACL request.
  4. Submit a CreateWebACL request.
  5. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateWebACL request.
  6. 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

data CreateWebACL Source #

See: newCreateWebACL smart constructor.

Constructors

CreateWebACL' 

Fields

  • tags :: Maybe (NonEmpty Tag)
     
  • name :: Text

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

  • metricName :: Text

    A friendly name or description for the metrics for this WebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the WebACL.

  • defaultAction :: WafAction

    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.

  • changeToken :: Text

    The value returned by the most recent call to GetChangeToken.

Instances

Instances details
Eq CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Read CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Show CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Generic CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Associated Types

type Rep CreateWebACL :: Type -> Type #

NFData CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Methods

rnf :: CreateWebACL -> () #

Hashable CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

ToJSON CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

AWSRequest CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Associated Types

type AWSResponse CreateWebACL #

ToHeaders CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

ToPath CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

ToQuery CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

type Rep CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

type Rep CreateWebACL = D1 ('MetaData "CreateWebACL" "Amazonka.WAF.CreateWebACL" "libZSservicesZSamazonka-wafZSamazonka-waf" 'False) (C1 ('MetaCons "CreateWebACL'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Tag))) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "metricName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "defaultAction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 WafAction) :*: S1 ('MetaSel ('Just "changeToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CreateWebACL Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

newCreateWebACL Source #

Create a value of CreateWebACL with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:tags:CreateWebACL', createWebACL_tags -

$sel:name:CreateWebACL', createWebACL_name - A friendly name or description of the WebACL. You can't change Name after you create the WebACL.

$sel:metricName:CreateWebACL', createWebACL_metricName - A friendly name or description for the metrics for this WebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the WebACL.

$sel:defaultAction:CreateWebACL', createWebACL_defaultAction - 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.

$sel:changeToken:CreateWebACL', createWebACL_changeToken - The value returned by the most recent call to GetChangeToken.

Request Lenses

createWebACL_name :: Lens' CreateWebACL Text Source #

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

createWebACL_metricName :: 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), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the WebACL.

createWebACL_defaultAction :: 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.

createWebACL_changeToken :: Lens' CreateWebACL Text Source #

The value returned by the most recent call to GetChangeToken.

Destructuring the Response

data CreateWebACLResponse Source #

See: newCreateWebACLResponse smart constructor.

Constructors

CreateWebACLResponse' 

Fields

  • webACL :: Maybe WebACL

    The WebACL returned in the CreateWebACL response.

  • changeToken :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CreateWebACLResponse Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Read CreateWebACLResponse Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Show CreateWebACLResponse Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Generic CreateWebACLResponse Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Associated Types

type Rep CreateWebACLResponse :: Type -> Type #

NFData CreateWebACLResponse Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

Methods

rnf :: CreateWebACLResponse -> () #

type Rep CreateWebACLResponse Source # 
Instance details

Defined in Amazonka.WAF.CreateWebACL

type Rep CreateWebACLResponse = D1 ('MetaData "CreateWebACLResponse" "Amazonka.WAF.CreateWebACL" "libZSservicesZSamazonka-wafZSamazonka-waf" 'False) (C1 ('MetaCons "CreateWebACLResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "webACL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WebACL)) :*: (S1 ('MetaSel ('Just "changeToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateWebACLResponse Source #

Create a value of CreateWebACLResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:webACL:CreateWebACLResponse', createWebACLResponse_webACL - The WebACL returned in the CreateWebACL response.

$sel:changeToken:CreateWebACL', createWebACLResponse_changeToken - 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.

$sel:httpStatus:CreateWebACLResponse', createWebACLResponse_httpStatus - The response's http status code.

Response Lenses

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

The WebACL returned in the CreateWebACL response.

createWebACLResponse_changeToken :: 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.