libZSservicesZSamazonka-cloudwatch-eventsZSamazonka-cloudwatch-events
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

  • 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.

  • 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.

  • name :: Text

    The name of the rule.

Instances

Instances details
Eq DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Read DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Show DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Generic DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Associated Types

type Rep DeleteRule :: Type -> Type #

NFData DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Methods

rnf :: DeleteRule -> () #

Hashable DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

ToJSON DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

AWSRequest DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Associated Types

type AWSResponse 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

type Rep DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

type Rep DeleteRule = D1 ('MetaData "DeleteRule" "Amazonka.CloudWatchEvents.DeleteRule" "libZSservicesZSamazonka-cloudwatch-eventsZSamazonka-cloudwatch-events" 'False) (C1 ('MetaCons "DeleteRule'" 'PrefixI 'True) (S1 ('MetaSel ('Just "force") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "eventBusName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse DeleteRule Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

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:

$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.

$sel:eventBusName: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:name:DeleteRule', deleteRule_name - The name of the rule.

Request Lenses

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_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_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
Eq DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Read DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Show DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Generic DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Associated Types

type Rep DeleteRuleResponse :: Type -> Type #

NFData DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

Methods

rnf :: DeleteRuleResponse -> () #

type Rep DeleteRuleResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.DeleteRule

type Rep DeleteRuleResponse = D1 ('MetaData "DeleteRuleResponse" "Amazonka.CloudWatchEvents.DeleteRule" "libZSservicesZSamazonka-cloudwatch-eventsZSamazonka-cloudwatch-events" '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.