Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmnarloch/aws-eventbridge-pattern-builder
AWS EventBridge Pattern DSL
https://github.com/jmnarloch/aws-eventbridge-pattern-builder
Last synced: 4 days ago
JSON representation
AWS EventBridge Pattern DSL
- Host: GitHub
- URL: https://github.com/jmnarloch/aws-eventbridge-pattern-builder
- Owner: jmnarloch
- License: apache-2.0
- Created: 2020-02-03T04:45:44.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-05T10:10:31.000Z (almost 5 years ago)
- Last Synced: 2023-07-04T14:06:55.860Z (over 1 year ago)
- Language: Java
- Size: 74.2 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS EventBridge Rule Pattern DSL
> A Java utility library for creating EventBridge Patterns.
## Setup
Add the library to your project:
```xml
io.jmnarloch
aws-eventbridge-pattern-builder
1.0.0
```## Usage
Library defines very simple builder pattern for creating an EventBridge Rule patterns.
Examples:
Matching events publish by `aws.ec2`.
```
EventsPattern.builder()
.equal("source", "aws.ec2")
.build();
```Matching events based on the `detail` content.
```
EventsPattern.builder()
.path("detail")
.equal("state", "terminated")
.parent()
.build();
```Matching attributes by prefix.
```
EventsPattern.builder()
.prefix("region", "eu-")
.build();
```Matching events that attribute is any value other then specified.
```
EventsPattern.builder()
.path("detail")
.anythingBut("state", "initializing")
.parent()
.build();
```Matching the events based on specified number comparision.
```
EventsPattern.builder()
.path("detail")
.numeric("c-count", Comparision.GREATER_THAN, 5)
.numeric("d-count", Comparision.LOWER_THAN, 10)
.numeric("x-limit", Comparision.EQUAL, 3.018e2)
.parent()
.build();
```See also the [documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/content-filtering-with-event-patterns.html#filtering-numeric-matching) for supported EventBridge operators.
## License
Apache 2.0