amazonka-waf-1.3.4: Amazon WAF SDK.

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

Network.AWS.WAF.UpdateWebACL

Contents

Description

Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies web requests that you want to allow, block, or count. When you update a WebACL, you specify the following values:

  • A default action for the WebACL, either ALLOW or BLOCK. AWS WAF performs the default action if a request doesn't match the criteria in any of the Rules in a WebACL.
  • The Rules that you want to add and/or delete. If you want to replace one Rule with another, you delete the existing Rule and add the new one.
  • For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match the conditions in the Rule.
  • The order in which you want AWS WAF to evaluate the Rules in a WebACL. If you add more than one Rule to a WebACL, AWS WAF evaluates each request against the Rules in order based on the value of Priority. (The Rule that has the lowest value for Priority is evaluated first.) When a web request matches all of the predicates (such as ByteMatchSets and IPSets) in a Rule, AWS WAF immediately takes the corresponding action, allow or block, and doesn't evaluate the request against the remaining Rules in the WebACL, if any.
  • The CloudFront distribution that you want to associate with the WebACL.

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

  1. Create and update the 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. Create a WebACL. See CreateWebACL.
  4. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateWebACL request.
  5. 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 to allow or block HTTP requests, see the AWS WAF Developer Guide.

See: AWS API Reference for UpdateWebACL.

Synopsis

Creating a Request

updateWebACL Source

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

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

Request Lenses

uwaUpdates :: Lens' UpdateWebACL [WebACLUpdate] Source

An array of updates to make to the WebACL.

An array of WebACLUpdate objects that you want to insert into or delete from a WebACL. For more information, see the applicable data types:

  • WebACLUpdate: Contains Action and ActivatedRule
  • ActivatedRule: Contains Action, Priority, and RuleId
  • WafAction: Contains Type

uwaWebACLId :: Lens' UpdateWebACL Text Source

The WebACLId of the WebACL that you want to update. WebACLId is returned by CreateWebACL and by ListWebACLs.

uwaChangeToken :: Lens' UpdateWebACL Text Source

The value returned by the most recent call to GetChangeToken.

Destructuring the Response

updateWebACLResponse Source

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

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

Response Lenses

uwarsChangeToken :: Lens' UpdateWebACLResponse (Maybe Text) Source

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