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 |
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
Rules
that you want to include in theRuleGroup
. SeeCreateRule
. - Use
GetChangeToken
to get the change token that you provide in theChangeToken
parameter of anUpdateRuleGroup
request. - Submit an
UpdateRuleGroup
request to addRules
to theRuleGroup
. - Create and update a
WebACL
that 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
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
- TheRuleGroupId
of theRuleGroup
that you want to update.RuleGroupId
is returned byCreateRuleGroup
and byListRuleGroups
.urgUpdates
- An array ofRuleGroupUpdate
objects that you want to insert into or delete from aRuleGroup
. You can only insertREGULAR
rules into a rule group.ActivatedRule|OverrideAction
applies only when updating or adding aRuleGroup
to aWebACL
. In this case you do not useActivatedRule|Action
. For all other update requests,ActivatedRule|Action
is 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 #
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
- TheChangeToken
that you used to submit theUpdateRuleGroup
request. 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.