amazonka-waf-regional-2.0: Amazon WAF Regional 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.WAFRegional.DeleteRule

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.

Permanently deletes a Rule. You can't delete a Rule if it's still used in any WebACL objects or if it still includes any predicates, such as ByteMatchSet objects.

If you just want to remove a Rule from a WebACL, use UpdateWebACL.

To permanently delete a Rule from AWS WAF, perform the following steps:

  1. Update the Rule to remove predicates, if any. For more information, see UpdateRule.
  2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteRule request.
  3. Submit a DeleteRule request.
Synopsis

Creating a Request

data DeleteRule Source #

See: newDeleteRule smart constructor.

Constructors

DeleteRule' 

Fields

  • ruleId :: Text

    The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule and by ListRules.

  • changeToken :: Text

    The value returned by the most recent call to GetChangeToken.

Instances

Instances details
ToJSON DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

ToHeaders DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Methods

toHeaders :: DeleteRule -> [Header] #

ToPath DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

ToQuery DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

AWSRequest DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Associated Types

type AWSResponse DeleteRule #

Generic DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Associated Types

type Rep DeleteRule :: Type -> Type #

Read DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Show DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

NFData DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Methods

rnf :: DeleteRule -> () #

Eq DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Hashable DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

type AWSResponse DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

type Rep DeleteRule Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

type Rep DeleteRule = D1 ('MetaData "DeleteRule" "Amazonka.WAFRegional.DeleteRule" "amazonka-waf-regional-2.0-83dY3vKOuQzAAW7M6EmzRI" 'False) (C1 ('MetaCons "DeleteRule'" 'PrefixI 'True) (S1 ('MetaSel ('Just "ruleId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "changeToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newDeleteRule Source #

Create a value of DeleteRule 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:

DeleteRule, deleteRule_ruleId - The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule and by ListRules.

DeleteRule, deleteRule_changeToken - The value returned by the most recent call to GetChangeToken.

Request Lenses

deleteRule_ruleId :: Lens' DeleteRule Text Source #

The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule and by ListRules.

deleteRule_changeToken :: Lens' DeleteRule Text Source #

The value returned by the most recent call to GetChangeToken.

Destructuring the Response

data DeleteRuleResponse Source #

See: newDeleteRuleResponse smart constructor.

Constructors

DeleteRuleResponse' 

Fields

  • changeToken :: Maybe Text

    The ChangeToken that you used to submit the DeleteRule 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 DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Associated Types

type Rep DeleteRuleResponse :: Type -> Type #

Read DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Show DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

NFData DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

Methods

rnf :: DeleteRuleResponse -> () #

Eq DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

type Rep DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.WAFRegional.DeleteRule

type Rep DeleteRuleResponse = D1 ('MetaData "DeleteRuleResponse" "Amazonka.WAFRegional.DeleteRule" "amazonka-waf-regional-2.0-83dY3vKOuQzAAW7M6EmzRI" 'False) (C1 ('MetaCons "DeleteRuleResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "changeToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newDeleteRuleResponse Source #

Create a value of DeleteRuleResponse 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:

DeleteRule, deleteRuleResponse_changeToken - The ChangeToken that you used to submit the DeleteRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.

$sel:httpStatus:DeleteRuleResponse', deleteRuleResponse_httpStatus - The response's http status code.

Response Lenses

deleteRuleResponse_changeToken :: Lens' DeleteRuleResponse (Maybe Text) Source #

The ChangeToken that you used to submit the DeleteRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.