interface EventBusProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Events.EventBusProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsevents#EventBusProps |
Java | software.amazon.awscdk.services.events.EventBusProps |
Python | aws_cdk.aws_events.EventBusProps |
TypeScript (source) | aws-cdk-lib » aws_events » EventBusProps |
Properties to define an event bus.
Example
import * as events from 'aws-cdk-lib/aws-events';
const eventBus = new events.EventBus(this, 'EventBus', {
eventBusName: 'DomainEvents',
});
const eventEntry: targets.EventBridgePutEventsEntry = {
eventBus,
source: 'PetService',
detail: ScheduleTargetInput.fromObject({ Name: 'Fluffy' }),
detailType: '🐶',
};
new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.hours(1)),
target: new targets.EventBridgePutEvents(eventEntry, {}),
});
Properties
Name | Type | Description |
---|---|---|
event | string | The name of the event bus you are creating Note: If 'eventSourceName' is passed in, you cannot set this. |
event | string | The partner event source to associate with this event bus resource Note: If 'eventBusName' is passed in, you cannot set this. |
eventBusName?
Type:
string
(optional, default: automatically generated name)
The name of the event bus you are creating Note: If 'eventSourceName' is passed in, you cannot set this.
eventSourceName?
Type:
string
(optional, default: no partner event source)
The partner event source to associate with this event bus resource Note: If 'eventBusName' is passed in, you cannot set this.