| Copyright | (c) 2013-2018 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.WAF.UpdateRuleGroup
Description
Inserts or deletes ActivatedRule objects in a RuleGroup .
You can only insert REGULAR rules into a rule group.
You can have a maximum of ten rules per rule group.
To create and configure a RuleGroup , perform the following steps:
- Create and update the
Rulesthat you want to include in theRuleGroup. SeeCreateRule. - Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of anUpdateRuleGrouprequest. - Submit an
UpdateRuleGrouprequest to addRulesto theRuleGroup. - Create and update a
WebACLthat contains theRuleGroup. SeeCreateWebACL.
If you want to replace one Rule with another, you delete the existing one and add the new one.
For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide .
Synopsis
- updateRuleGroup :: Text -> NonEmpty RuleGroupUpdate -> Text -> UpdateRuleGroup
- data UpdateRuleGroup
- urgRuleGroupId :: Lens' UpdateRuleGroup Text
- urgUpdates :: Lens' UpdateRuleGroup (NonEmpty RuleGroupUpdate)
- urgChangeToken :: Lens' UpdateRuleGroup Text
- updateRuleGroupResponse :: Int -> UpdateRuleGroupResponse
- data UpdateRuleGroupResponse
- urgrsChangeToken :: Lens' UpdateRuleGroupResponse (Maybe Text)
- urgrsResponseStatus :: Lens' UpdateRuleGroupResponse Int
Creating a Request
Arguments
| :: Text | |
| -> NonEmpty RuleGroupUpdate | |
| -> Text | |
| -> UpdateRuleGroup |
Creates a value of UpdateRuleGroup with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
urgRuleGroupId- TheRuleGroupIdof theRuleGroupthat you want to update.RuleGroupIdis returned byCreateRuleGroupand byListRuleGroups.urgUpdates- An array ofRuleGroupUpdateobjects that you want to insert into or delete from aRuleGroup. You can only insertREGULARrules into a rule group.ActivatedRule|OverrideActionapplies only when updating or adding aRuleGroupto aWebACL. In this case you do not useActivatedRule|Action. For all other update requests,ActivatedRule|Actionis used instead ofActivatedRule|OverrideAction.urgChangeToken- The value returned by the most recent call toGetChangeToken.
data UpdateRuleGroup Source #
See: updateRuleGroup smart constructor.
Instances
Request Lenses
urgRuleGroupId :: Lens' UpdateRuleGroup Text Source #
The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups .
urgUpdates :: Lens' UpdateRuleGroup (NonEmpty RuleGroupUpdate) Source #
An array of RuleGroupUpdate objects that you want to insert into or delete from a RuleGroup . You can only insert REGULAR rules into a rule group. ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup to a WebACL . In this case you do not use ActivatedRule|Action . For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction .
urgChangeToken :: Lens' UpdateRuleGroup Text Source #
The value returned by the most recent call to GetChangeToken .
Destructuring the Response
updateRuleGroupResponse Source #
Arguments
| :: Int | |
| -> UpdateRuleGroupResponse |
Creates a value of UpdateRuleGroupResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
urgrsChangeToken- TheChangeTokenthat you used to submit theUpdateRuleGrouprequest. You can also use this value to query the status of the request. For more information, seeGetChangeTokenStatus.urgrsResponseStatus- -- | The response status code.
data UpdateRuleGroupResponse Source #
See: updateRuleGroupResponse smart constructor.
Instances
Response Lenses
urgrsChangeToken :: Lens' UpdateRuleGroupResponse (Maybe Text) Source #
The ChangeToken that you used to submit the UpdateRuleGroup request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus .
urgrsResponseStatus :: Lens' UpdateRuleGroupResponse Int Source #
- - | The response status code.