EventBus

class aws_cdk.aws_events_targets.EventBus(event_bus, *, dead_letter_queue=None, role=None)

Bases: object

Notify an existing Event Bus of an event.

ExampleMetadata

infused

Example:

rule = events.Rule(self, "Rule",
    schedule=events.Schedule.expression("rate(1 minute)")
)

rule.add_target(targets.EventBus(
    events.EventBus.from_event_bus_arn(self, "External", "arn:aws:events:eu-west-1:999999999999:event-bus/test-bus")))
Parameters
  • event_bus (IEventBus) –

  • dead_letter_queue (Optional[IQueue]) – The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue. The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue. Default: - no dead-letter queue

  • role (Optional[IRole]) – Role to be used to publish the event. Default: a new role is created.

Methods

bind(rule, _id=None)

Returns the rule target specification.

NOTE: Do not use the various inputXxx options. They can be set in a call to addTarget.

Parameters
  • rule (IRule) –

  • _id (Optional[str]) –

Return type

RuleTargetConfig