@Generated(value="jsii-pacmak/1.29.0 (build 41df200)", date="2021-06-02T09:55:31.229Z") @Stability(value=Experimental) public interface EventPattern extends software.amazon.jsii.JsiiSerializable
Rules use event patterns to select events and route them to targets. A pattern either matches an event or it doesn't. Event patterns are represented as JSON objects with a structure that is similar to that of events, for example:
It is important to remember the following about event pattern matching:
"*": "*" wildcard for fields not mentioned.https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html| Modifier and Type | Interface and Description |
|---|---|
static class |
EventPattern.Builder
A builder for
EventPattern |
static class |
EventPattern.Jsii$Proxy
An implementation for
EventPattern |
| Modifier and Type | Method and Description |
|---|---|
static EventPattern.Builder |
builder() |
default List<String> |
getAccount()
(experimental) The 12-digit number identifying an AWS account.
|
default Map<String,Object> |
getDetail()
(experimental) A JSON object, whose content is at the discretion of the service originating the event.
|
default List<String> |
getDetailType()
(experimental) Identifies, in combination with the source field, the fields and values that appear in the detail field.
|
default List<String> |
getId()
(experimental) A unique value is generated for every event.
|
default List<String> |
getRegion()
(experimental) Identifies the AWS region where the event originated.
|
default List<String> |
getResources()
(experimental) This JSON array contains ARNs that identify resources that are involved in the event.
|
default List<String> |
getSource()
(experimental) Identifies the service that sourced the event.
|
default List<String> |
getTime()
(experimental) The event timestamp, which can be specified by the service originating the event.
|
default List<String> |
getVersion()
(experimental) By default, this is set to 0 (zero) in all events.
|
@Stability(value=Experimental) @Nullable default List<String> getAccount()
Default: - No filtering on account
@Stability(value=Experimental) @Nullable default Map<String,Object> getDetail()
Default: - No filtering on detail
@Stability(value=Experimental) @Nullable default List<String> getDetailType()
Represents the "detail-type" event field.
Default: - No filtering on detail type
@Stability(value=Experimental) @Nullable default List<String> getId()
This can be helpful in tracing events as they move through rules to targets, and are processed.
Default: - No filtering on id
@Stability(value=Experimental) @Nullable default List<String> getRegion()
Default: - No filtering on region
@Stability(value=Experimental) @Nullable default List<String> getResources()
Inclusion of these ARNs is at the discretion of the service.
For example, Amazon EC2 instance state-changes include Amazon EC2 instance ARNs, Auto Scaling events include ARNs for both instances and Auto Scaling groups, but API calls with AWS CloudTrail do not include resource ARNs.
Default: - No filtering on resource
@Stability(value=Experimental) @Nullable default List<String> getSource()
All events sourced from within AWS begin with "aws." Customer-generated events can have any value here, as long as it doesn't begin with "aws." We recommend the use of Java package-name style reverse domain-name strings.
To find the correct value for source for an AWS service, see the table in AWS Service Namespaces. For example, the source value for Amazon CloudFront is aws.cloudfront.
Default: - No filtering on source
http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces@Stability(value=Experimental) @Nullable default List<String> getTime()
If the event spans a time interval, the service might choose to report the start time, so this value can be noticeably before the time the event is actually received.
Default: - No filtering on time
@Stability(value=Experimental) @Nullable default List<String> getVersion()
Default: - No filtering on version
@Stability(value=Experimental) static EventPattern.Builder builder()
EventPattern.Builder of EventPatternCopyright © 2021. All rights reserved.