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

Description

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

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

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

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

  • rule :: Text

    The name of the rule.

  • ids :: NonEmpty Text

    The IDs of the targets to remove from the rule.

Instances

Instances details
Eq RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Read RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Show RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Generic RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Associated Types

type Rep RemoveTargets :: Type -> Type #

NFData RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Methods

rnf :: RemoveTargets -> () #

Hashable RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

ToJSON RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

AWSRequest RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Associated Types

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

type Rep RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

type Rep RemoveTargets = D1 ('MetaData "RemoveTargets" "Amazonka.CloudWatchEvents.RemoveTargets" "libZSservicesZSamazonka-cloudwatch-eventsZSamazonka-cloudwatch-events" 'False) (C1 ('MetaCons "RemoveTargets'" '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 "rule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "ids") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text)))))
type AWSResponse RemoveTargets Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

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:

$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:eventBusName: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: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_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_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_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
Eq RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Read RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Show RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Generic RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Associated Types

type Rep RemoveTargetsResponse :: Type -> Type #

NFData RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

Methods

rnf :: RemoveTargetsResponse -> () #

type Rep RemoveTargetsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.RemoveTargets

type Rep RemoveTargetsResponse = D1 ('MetaData "RemoveTargetsResponse" "Amazonka.CloudWatchEvents.RemoveTargets" "libZSservicesZSamazonka-cloudwatch-eventsZSamazonka-cloudwatch-events" 'False) (C1 ('MetaCons "RemoveTargetsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "failedEntryCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "failedEntries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [RemoveTargetsResultEntry])) :*: 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:failedEntryCount:RemoveTargetsResponse', removeTargetsResponse_failedEntryCount - The number of failed entries.

$sel:failedEntries:RemoveTargetsResponse', removeTargetsResponse_failedEntries - The failed target entries.

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

Response Lenses