EventBusProps

class aws_cdk.aws_events.EventBusProps(*, event_bus_name=None, event_source_name=None)

Bases: object

Properties to define an event bus.

Parameters:
  • event_bus_name (Optional[str]) – The name of the event bus you are creating Note: If ‘eventSourceName’ is passed in, you cannot set this. Default: - automatically generated name

  • event_source_name (Optional[str]) – The partner event source to associate with this event bus resource Note: If ‘eventBusName’ is passed in, you cannot set this. Default: - no partner event source

ExampleMetadata:

infused

Example:

bus = events.EventBus(self, "bus",
    event_bus_name="MyCustomEventBus"
)

bus.archive("MyArchive",
    archive_name="MyCustomEventBusArchive",
    description="MyCustomerEventBus Archive",
    event_pattern=events.EventPattern(
        account=[Stack.of(self).account]
    ),
    retention=Duration.days(365)
)

Attributes

event_bus_name

If ‘eventSourceName’ is passed in, you cannot set this.

Default:
  • automatically generated name

Link:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-name

Type:

The name of the event bus you are creating Note

event_source_name

If ‘eventBusName’ is passed in, you cannot set this.

Default:
  • no partner event source

Link:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-eventsourcename

Type:

The partner event source to associate with this event bus resource Note