{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.WAFV2.Types.WebACL -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.WAFV2.Types.WebACL where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude import Amazonka.WAFV2.Types.CaptchaConfig import Amazonka.WAFV2.Types.ChallengeConfig import Amazonka.WAFV2.Types.CustomResponseBody import Amazonka.WAFV2.Types.DefaultAction import Amazonka.WAFV2.Types.FirewallManagerRuleGroup import Amazonka.WAFV2.Types.Rule import Amazonka.WAFV2.Types.VisibilityConfig -- | A web ACL defines a collection of rules to use to inspect and control -- web requests. Each rule has an action defined (allow, block, or count) -- for requests that match the statement of the rule. In the web ACL, you -- assign a default action to take (allow, block) for any request that does -- not match any of the rules. The rules in a web ACL can be a combination -- of the types Rule, RuleGroup, and managed rule group. You can associate -- a web ACL with one or more Amazon Web Services resources to protect. The -- resources can be an Amazon CloudFront distribution, an Amazon API -- Gateway REST API, an Application Load Balancer, an AppSync GraphQL API, -- or an Amazon Cognito user pool. -- -- /See:/ 'newWebACL' smart constructor. data WebACL = WebACL' { -- | The web ACL capacity units (WCUs) currently being used by this web ACL. -- -- WAF uses WCUs to calculate and control the operating resources that are -- used to run your rules, rule groups, and web ACLs. WAF calculates -- capacity differently for each rule type, to reflect the relative cost of -- each rule. Simple rules that cost little to run use fewer WCUs than more -- complex rules that use more processing power. Rule group capacity is -- fixed at creation, which helps users plan their web ACL WCU usage when -- they use a rule group. The WCU limit for web ACLs is 1,500. capacity :: Prelude.Maybe Prelude.Natural, -- | Specifies how WAF should handle @CAPTCHA@ evaluations for rules that -- don\'t have their own @CaptchaConfig@ settings. If you don\'t specify -- this, WAF uses its default settings for @CaptchaConfig@. captchaConfig :: Prelude.Maybe CaptchaConfig, -- | Specifies how WAF should handle challenge evaluations for rules that -- don\'t have their own @ChallengeConfig@ settings. If you don\'t specify -- this, WAF uses its default settings for @ChallengeConfig@. challengeConfig :: Prelude.Maybe ChallengeConfig, -- | A map of custom response keys and content bodies. When you create a rule -- with a block action, you can send a custom response to the web request. -- You define these for the web ACL, and then use them in the rules and -- default actions that you define in the web ACL. -- -- For information about customizing web requests and responses, see -- -- in the -- . -- -- For information about the limits on count and size for custom request -- and response settings, see -- -- in the -- . customResponseBodies :: Prelude.Maybe (Prelude.HashMap Prelude.Text CustomResponseBody), -- | A description of the web ACL that helps with identification. description :: Prelude.Maybe Prelude.Text, -- | The label namespace prefix for this web ACL. All labels added by rules -- in this web ACL have this prefix. -- -- - The syntax for the label namespace prefix for a web ACL is the -- following: -- -- @awswaf:\:webacl:\:@ -- -- - When a rule with a label matches a web request, WAF adds the fully -- qualified label to the request. A fully qualified label is made up -- of the label namespace from the rule group or web ACL where the rule -- is defined and the label from the rule, separated by a colon: -- -- @\