EventBusProps

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

Bases: object

Properties to define an event bus.

Parameters:
  • dead_letter_queue (Optional[IQueue]) – Dead-letter queue for the event bus. Default: - no dead-letter queue

  • description (Optional[str]) – The event bus description. The description can be up to 512 characters long. Default: - no description

  • 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

  • kms_key (Optional[IKey]) – The customer managed key that encrypt events on this event bus. Default: - Use an AWS managed key

ExampleMetadata:

infused

Example:

import aws_cdk.aws_events as events


my_event_bus = events.EventBus(self, "EventBus",
    event_bus_name="MyEventBus1"
)

tasks.EventBridgePutEvents(self, "Send an event to EventBridge",
    entries=[tasks.EventBridgePutEventsEntry(
        detail=sfn.TaskInput.from_object({
            "Message": "Hello from Step Functions!"
        }),
        event_bus=my_event_bus,
        detail_type="MessageFromStepFunctions",
        source="step.functions"
    )]
)

Attributes

dead_letter_queue

Dead-letter queue for the event bus.

Default:
  • no dead-letter queue

See:

https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq

description

The event bus description.

The description can be up to 512 characters long.

Default:
  • no description

See:

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

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

kms_key

The customer managed key that encrypt events on this event bus.

Default:
  • Use an AWS managed key