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

Description

Tests whether the specified event pattern matches the provided event.

Most services in Amazon Web Services treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.

Synopsis

Creating a Request

data TestEventPattern Source #

See: newTestEventPattern smart constructor.

Constructors

TestEventPattern' 

Fields

Instances

Instances details
ToJSON TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

ToHeaders TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

ToPath TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

ToQuery TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

AWSRequest TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

Associated Types

type AWSResponse TestEventPattern #

Generic TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

Associated Types

type Rep TestEventPattern :: Type -> Type #

Read TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

Show TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

NFData TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

Methods

rnf :: TestEventPattern -> () #

Eq TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

Hashable TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

type AWSResponse TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

type Rep TestEventPattern Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

type Rep TestEventPattern = D1 ('MetaData "TestEventPattern" "Amazonka.CloudWatchEvents.TestEventPattern" "amazonka-cloudwatch-events-2.0-GJzRBos1CnlE3BT39axMc5" 'False) (C1 ('MetaCons "TestEventPattern'" 'PrefixI 'True) (S1 ('MetaSel ('Just "eventPattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "event") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newTestEventPattern Source #

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

TestEventPattern, testEventPattern_eventPattern - The event pattern. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide.

$sel:event:TestEventPattern', testEventPattern_event - The event, in JSON format, to test against the event pattern. The JSON must follow the format specified in Amazon Web Services Events, and the following fields are mandatory:

  • id
  • account
  • source
  • time
  • region
  • resources
  • detail-type

Request Lenses

testEventPattern_eventPattern :: Lens' TestEventPattern Text Source #

The event pattern. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide.

testEventPattern_event :: Lens' TestEventPattern Text Source #

The event, in JSON format, to test against the event pattern. The JSON must follow the format specified in Amazon Web Services Events, and the following fields are mandatory:

  • id
  • account
  • source
  • time
  • region
  • resources
  • detail-type

Destructuring the Response

data TestEventPatternResponse Source #

See: newTestEventPatternResponse smart constructor.

Constructors

TestEventPatternResponse' 

Fields

Instances

Instances details
Generic TestEventPatternResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

Associated Types

type Rep TestEventPatternResponse :: Type -> Type #

Read TestEventPatternResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

Show TestEventPatternResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

NFData TestEventPatternResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

Eq TestEventPatternResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

type Rep TestEventPatternResponse Source # 
Instance details

Defined in Amazonka.CloudWatchEvents.TestEventPattern

type Rep TestEventPatternResponse = D1 ('MetaData "TestEventPatternResponse" "Amazonka.CloudWatchEvents.TestEventPattern" "amazonka-cloudwatch-events-2.0-GJzRBos1CnlE3BT39axMc5" 'False) (C1 ('MetaCons "TestEventPatternResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "result") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newTestEventPatternResponse Source #

Create a value of TestEventPatternResponse 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:result:TestEventPatternResponse', testEventPatternResponse_result - Indicates whether the event matches the event pattern.

$sel:httpStatus:TestEventPatternResponse', testEventPatternResponse_httpStatus - The response's http status code.

Response Lenses

testEventPatternResponse_result :: Lens' TestEventPatternResponse (Maybe Bool) Source #

Indicates whether the event matches the event pattern.