Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data TestEventPattern = TestEventPattern' {
- eventPattern :: Text
- event :: Text
- newTestEventPattern :: Text -> Text -> TestEventPattern
- testEventPattern_eventPattern :: Lens' TestEventPattern Text
- testEventPattern_event :: Lens' TestEventPattern Text
- data TestEventPatternResponse = TestEventPatternResponse' {
- result :: Maybe Bool
- httpStatus :: Int
- newTestEventPatternResponse :: Int -> TestEventPatternResponse
- testEventPatternResponse_result :: Lens' TestEventPatternResponse (Maybe Bool)
- testEventPatternResponse_httpStatus :: Lens' TestEventPatternResponse Int
Creating a Request
data TestEventPattern Source #
See: newTestEventPattern
smart constructor.
TestEventPattern' | |
|
Instances
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:
$sel:eventPattern: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.
TestEventPatternResponse' | |
|
Instances
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.
testEventPatternResponse_httpStatus :: Lens' TestEventPatternResponse Int Source #
The response's http status code.