| Copyright | (c) 2013-2015 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.WAF.UpdateWebACL
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, eitherALLOWorBLOCK. AWS WAF performs the default action if a request doesn't match the criteria in any of theRulesin aWebACL. - The
Rulesthat you want to add and/or delete. If you want to replace oneRulewith another, you delete the existingRuleand 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 theRule. - The order in which you want AWS WAF to evaluate the
Rulesin aWebACL. If you add more than oneRuleto aWebACL, AWS WAF evaluates each request against theRulesin order based on the value ofPriority. (TheRulethat has the lowest value forPriorityis evaluated first.) When a web request matches all of the predicates (such asByteMatchSetsandIPSets) in aRule, AWS WAF immediately takes the corresponding action, allow or block, and doesn't evaluate the request against the remainingRulesin theWebACL, if any. - The CloudFront distribution that you want to associate with the
WebACL.
To create and configure a WebACL, perform the following steps:
- Create and update the predicates that you want to include in
Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet. - Create and update the
Rulesthat you want to include in theWebACL. For more information, see CreateRule and UpdateRule. - Create a
WebACL. See CreateWebACL. - Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of an UpdateWebACL request. - Submit an
UpdateWebACLrequest to specify theRulesthat you want to include in theWebACL, to specify the default action, and to associate theWebACLwith 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.
- updateWebACL :: Text -> Text -> UpdateWebACL
- data UpdateWebACL
- uwaUpdates :: Lens' UpdateWebACL [WebACLUpdate]
- uwaDefaultAction :: Lens' UpdateWebACL (Maybe WafAction)
- uwaWebACLId :: Lens' UpdateWebACL Text
- uwaChangeToken :: Lens' UpdateWebACL Text
- updateWebACLResponse :: Int -> UpdateWebACLResponse
- data UpdateWebACLResponse
- uwarsChangeToken :: Lens' UpdateWebACLResponse (Maybe Text)
- uwarsResponseStatus :: Lens' UpdateWebACLResponse Int
Creating a Request
Arguments
| :: Text | |
| -> Text | |
| -> UpdateWebACL |
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:
data UpdateWebACL Source
See: updateWebACL smart constructor.
Instances
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
ActionandActivatedRule - ActivatedRule: Contains
Action,Priority, andRuleId - WafAction: Contains
Type
uwaDefaultAction :: Lens' UpdateWebACL (Maybe WafAction) Source
Undocumented member.
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
Arguments
| :: Int | |
| -> UpdateWebACLResponse |
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:
data UpdateWebACLResponse Source
See: updateWebACLResponse smart constructor.
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.
uwarsResponseStatus :: Lens' UpdateWebACLResponse Int Source
The response status code.