amazonka-waf-2.0: Amazon WAF SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.WAF.UpdateRuleGroup

Description

This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.

For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

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:

  1. Create and update the Rules that you want to include in the RuleGroup. See CreateRule.
  2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRuleGroup request.
  3. Submit an UpdateRuleGroup request to add Rules to the RuleGroup.
  4. Create and update a WebACL that contains the RuleGroup. See CreateWebACL.

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

Creating a Request

data UpdateRuleGroup Source #

See: newUpdateRuleGroup smart constructor.

Constructors

UpdateRuleGroup' 

Fields

  • ruleGroupId :: Text

    The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups.

  • updates :: NonEmpty RuleGroupUpdate

    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.

  • changeToken :: Text

    The value returned by the most recent call to GetChangeToken.

Instances

Instances details
ToJSON UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

ToHeaders UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

ToPath UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

ToQuery UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

AWSRequest UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

Associated Types

type AWSResponse UpdateRuleGroup #

Generic UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

Associated Types

type Rep UpdateRuleGroup :: Type -> Type #

Read UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

Show UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

NFData UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

Methods

rnf :: UpdateRuleGroup -> () #

Eq UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

Hashable UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

type AWSResponse UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

type Rep UpdateRuleGroup Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

type Rep UpdateRuleGroup = D1 ('MetaData "UpdateRuleGroup" "Amazonka.WAF.UpdateRuleGroup" "amazonka-waf-2.0-7D7QOxIEZeF1ayfX9AzEZC" 'False) (C1 ('MetaCons "UpdateRuleGroup'" 'PrefixI 'True) (S1 ('MetaSel ('Just "ruleGroupId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "updates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty RuleGroupUpdate)) :*: S1 ('MetaSel ('Just "changeToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newUpdateRuleGroup Source #

Create a value of UpdateRuleGroup with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

UpdateRuleGroup, updateRuleGroup_ruleGroupId - The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups.

$sel:updates:UpdateRuleGroup', updateRuleGroup_updates - 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.

UpdateRuleGroup, updateRuleGroup_changeToken - The value returned by the most recent call to GetChangeToken.

Request Lenses

updateRuleGroup_ruleGroupId :: Lens' UpdateRuleGroup Text Source #

The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups.

updateRuleGroup_updates :: 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.

updateRuleGroup_changeToken :: Lens' UpdateRuleGroup Text Source #

The value returned by the most recent call to GetChangeToken.

Destructuring the Response

data UpdateRuleGroupResponse Source #

See: newUpdateRuleGroupResponse smart constructor.

Constructors

UpdateRuleGroupResponse' 

Fields

  • changeToken :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic UpdateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

Associated Types

type Rep UpdateRuleGroupResponse :: Type -> Type #

Read UpdateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

Show UpdateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

NFData UpdateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

Methods

rnf :: UpdateRuleGroupResponse -> () #

Eq UpdateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

type Rep UpdateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAF.UpdateRuleGroup

type Rep UpdateRuleGroupResponse = D1 ('MetaData "UpdateRuleGroupResponse" "Amazonka.WAF.UpdateRuleGroup" "amazonka-waf-2.0-7D7QOxIEZeF1ayfX9AzEZC" 'False) (C1 ('MetaCons "UpdateRuleGroupResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "changeToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newUpdateRuleGroupResponse Source #

Create a value of UpdateRuleGroupResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

UpdateRuleGroup, updateRuleGroupResponse_changeToken - 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.

$sel:httpStatus:UpdateRuleGroupResponse', updateRuleGroupResponse_httpStatus - The response's http status code.

Response Lenses

updateRuleGroupResponse_changeToken :: 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.