Skip to content

Commit

Permalink
docs(events): add a note about not using EventPattern with CfnRule (
Browse files Browse the repository at this point in the history
#16715)

Fixes #16563.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored Oct 4, 2021
1 parent 63614b9 commit 0bc58cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/@aws-cdk/aws-events/lib/event-pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
* Events in Amazon CloudWatch Events are represented as JSON objects. For more
* information about JSON objects, see RFC 7159.
*
* **Important**: this class can only be used with a `Rule` class. In particular,
* do not use it with `CfnRule` class: your pattern will not be rendered
* correctly. In a `CfnRule` class, write the pattern as you normally would when
* directly writing CloudFormation.
*
* 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:
* as JSON objects with a structure that is similar to that of events.
*
* It is important to remember the following about event pattern matching:
*
Expand Down

0 comments on commit 0bc58cd

Please sign in to comment.