Skip to content

Commit

Permalink
docs(events): mention property requirements when creating custom even…
Browse files Browse the repository at this point in the history
…ts (#29287)

### Issue # (if applicable)

Closes #<issue number here>.

### Reason for this change

When creating an EventPattern for a custom event, a few properties are required. Documentation currently isn't clear on which properties are required. This change links to AWS documentation that describes the required properties for custom events.

### Description of changes

Added text stating that some optional properties are required for custom events and provided link to docs. 

### Description of how you validated changes

No validation

### Checklist
- [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
evzzk authored Feb 29, 2024
1 parent f803cf6 commit 6fe97ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/aws-cdk-lib/aws-events/lib/event-pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ export class Match implements IResolvable {
* - Number matching is at the string representation level. For example, 300,
* 300.0, and 3.0e2 are not considered equal.
*
* For custom events, some optional properties are required. For more information, see
* [Minimum information needed for a valid custom event](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html#eb-custom-event).
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html
*/
export interface EventPattern {
Expand Down

0 comments on commit 6fe97ea

Please sign in to comment.