amazonka-cloudwatch-events-2.0: Amazon EventBridge 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.CloudWatchEvents.DeleteRule

Description

Deletes the specified rule.

Before you can delete the rule, you must remove all targets, using RemoveTargets.

When you delete a rule, incoming events might continue to match to the deleted rule. Allow a short period of time for changes to take effect.

If you call delete rule multiple times for the same rule, all calls will succeed. When you call delete rule for a non-existent custom eventbus, ResourceNotFoundException is returned.

Managed rules are rules created and managed by another Amazon Web Services service on your behalf. These rules are created by those other Amazon Web Services services to support functionality in those services. You can delete these rules using the Force option, but you should do so only if you are sure the other service is not still using that rule.

Synopsis

Creating a Request

data DeleteRule Source #

See: newDeleteRule smart constructor.

Constructors

DeleteRule' 

Fields

  • eventBusName :: Maybe Text

    The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

  • force :: Maybe Bool

    If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify Force as True to delete the rule. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

  • name :: Text

    The name of the rule.

Instances

Instances details
ToJSON DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

ToHeaders DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Methods

toHeaders :: DeleteRule -> [Header] #

ToPath DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

ToQuery DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

AWSRequest DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Associated Types

type AWSResponse DeleteRule #

Generic DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Associated Types

type Rep DeleteRule :: Type -> Type #

Read DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Show DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

NFData DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Methods

rnf :: DeleteRule -> () #

Eq DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Hashable DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

type AWSResponse DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

type Rep DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

type Rep DeleteRule = D1 ('MetaData "DeleteRule" "Amazonka.CloudWatchEvents.DeleteRule" "amazonka-cloudwatch-events-2.0-GJzRBos1CnlE3BT39axMc5" 'False) (C1 ('MetaCons "DeleteRule'" 'PrefixI 'True) (S1 ('MetaSel ('Just "eventBusName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "force") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newDeleteRule Source #

Arguments

:: Text

DeleteRule

-> DeleteRule 

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_eventBusName - The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

$sel:force:DeleteRule', deleteRule_force - If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify Force as True to delete the rule. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

DeleteRule, deleteRule_name - The name of the rule.

Request Lenses

deleteRule_eventBusName :: Lens' DeleteRule (Maybe Text) Source #

The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

deleteRule_force :: Lens' DeleteRule (Maybe Bool) Source #

If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify Force as True to delete the rule. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

deleteRule_name :: Lens' DeleteRule Text Source #

The name of the rule.

Destructuring the Response

data DeleteRuleResponse Source #

See: newDeleteRuleResponse smart constructor.

Constructors

DeleteRuleResponse' 

Instances

Instances details
Generic DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Associated Types

type Rep DeleteRuleResponse :: Type -> Type #

Read DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Show DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

NFData DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Methods

rnf :: DeleteRuleResponse -> () #

Eq DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

type Rep DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

type Rep DeleteRuleResponse = D1 ('MetaData "DeleteRuleResponse" "Amazonka.CloudWatchEvents.DeleteRule" "amazonka-cloudwatch-events-2.0-GJzRBos1CnlE3BT39axMc5" 'False) (C1 ('MetaCons "DeleteRuleResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newDeleteRuleResponse :: DeleteRuleResponse Source #

Create a value of DeleteRuleResponse with all optional fields omitted.

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