AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Notifications::EventRule

CfnEventRule

Creates an [`EventRule`](https://docs.aws.amazon.com/notifications/latest/userguide/glossary.html) that is associated with a specified `NotificationConfiguration` .

Import

import { CfnEventRule } from 'aws-cdk-lib/aws-notifications';

Or use the module namespace:

import * as notifications from 'aws-cdk-lib/aws-notifications';
// notifications.CfnEventRule

Properties

Configuration passed to the constructor as CfnEventRuleProps.

eventTypeRequired
string

The event type this rule should match with the EventBridge events. It must match with atleast one of the valid EventBridge event types. For example, Amazon EC2 Instance State change Notification and Amazon CloudWatch State Change. For more information, see [Event delivery from AWS services](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level) in the *Amazon EventBridge User Guide* .

notificationConfigurationArnRequired
string

The ARN for the `NotificationConfiguration` associated with this `EventRule` .

regionsRequired
string[]

A list of AWS Regions that send events to this `EventRule` .

sourceRequired
string

The event source this rule should match with the EventBridge event sources. It must match with atleast one of the valid EventBridge event sources. Only AWS service sourced events are supported. For example, `aws.ec2` and `aws.cloudwatch` . For more information, see [Event delivery from AWS services](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level) in the *Amazon EventBridge User Guide* .

eventPatternOptional
string

An additional event pattern used to further filter the events this `EventRule` receives. For more information, see [Amazon EventBridge event patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html) in the *Amazon EventBridge User Guide.*

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter