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

Description

Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be invoked.

A successful execution of RemoveTargets doesn't guarantee all targets are removed from the rule, it means that the target(s) listed in the request are removed.

When you remove a target, when the associated rule triggers, removed targets might continue to be invoked. Allow a short period of time for changes to take effect.

This action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is non-zero in the response and each entry in FailedEntries provides the ID of the failed target and the error code.

Synopsis

Creating a Request

data RemoveTargets Source #

See: newRemoveTargets smart constructor.

Constructors

RemoveTargets' 

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 remove targets. 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.

  • rule :: Text

    The name of the rule.

  • ids :: NonEmpty Text

    The IDs of the targets to remove from the rule.

Instances

Instances details
ToJSON RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

ToHeaders RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

ToPath RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

ToQuery RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

AWSRequest RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Associated Types

type AWSResponse RemoveTargets #

Generic RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Associated Types

type Rep RemoveTargets :: Type -> Type #

Read RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Show RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

NFData RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Methods

rnf :: RemoveTargets -> () #

Eq RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Hashable RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

type AWSResponse RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

type Rep RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

type Rep RemoveTargets = D1 ('MetaData "RemoveTargets" "Amazonka.CloudWatchEvents.RemoveTargets" "amazonka-cloudwatch-events-2.0-GJzRBos1CnlE3BT39axMc5" 'False) (C1 ('MetaCons "RemoveTargets'" '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 "rule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "ids") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text)))))

newRemoveTargets Source #

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

RemoveTargets, removeTargets_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:RemoveTargets', removeTargets_force - If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify Force as True to remove targets. 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:rule:RemoveTargets', removeTargets_rule - The name of the rule.

$sel:ids:RemoveTargets', removeTargets_ids - The IDs of the targets to remove from the rule.

Request Lenses

removeTargets_eventBusName :: Lens' RemoveTargets (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.

removeTargets_force :: Lens' RemoveTargets (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 remove targets. 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.

removeTargets_ids :: Lens' RemoveTargets (NonEmpty Text) Source #

The IDs of the targets to remove from the rule.

Destructuring the Response

data RemoveTargetsResponse Source #

See: newRemoveTargetsResponse smart constructor.

Constructors

RemoveTargetsResponse' 

Fields

Instances

Instances details
Generic RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Associated Types

type Rep RemoveTargetsResponse :: Type -> Type #

Read RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Show RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

NFData RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Methods

rnf :: RemoveTargetsResponse -> () #

Eq RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

type Rep RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

type Rep RemoveTargetsResponse = D1 ('MetaData "RemoveTargetsResponse" "Amazonka.CloudWatchEvents.RemoveTargets" "amazonka-cloudwatch-events-2.0-GJzRBos1CnlE3BT39axMc5" 'False) (C1 ('MetaCons "RemoveTargetsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "failedEntries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [RemoveTargetsResultEntry])) :*: (S1 ('MetaSel ('Just "failedEntryCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newRemoveTargetsResponse Source #

Create a value of RemoveTargetsResponse 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:failedEntries:RemoveTargetsResponse', removeTargetsResponse_failedEntries - The failed target entries.

$sel:failedEntryCount:RemoveTargetsResponse', removeTargetsResponse_failedEntryCount - The number of failed entries.

$sel:httpStatus:RemoveTargetsResponse', removeTargetsResponse_httpStatus - The response's http status code.

Response Lenses