Interface EventBusProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
EventBusProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.229Z") @Stability(Stable) public interface EventBusProps extends software.amazon.jsii.JsiiSerializable
Properties to define an event bus.

Example:

 import software.amazon.awscdk.services.events.*;
 EventBus eventBus = EventBus.Builder.create(this, "EventBus")
         .eventBusName("DomainEvents")
         .build();
 EventBridgePutEventsEntry eventEntry = EventBridgePutEventsEntry.builder()
         .eventBus(eventBus)
         .source("PetService")
         .detail(ScheduleTargetInput.fromObject(Map.of("Name", "Fluffy")))
         .detailType("🐶")
         .build();
 Schedule.Builder.create(this, "Schedule")
         .schedule(ScheduleExpression.rate(Duration.hours(1)))
         .target(EventBridgePutEvents.Builder.create(eventEntry).build())
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for EventBusProps
    static final class 
    An implementation for EventBusProps
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default String
    The name of the event bus you are creating Note: If 'eventSourceName' is passed in, you cannot set this.
    default String
    The partner event source to associate with this event bus resource Note: If 'eventBusName' is passed in, you cannot set this.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getEventBusName

      @Stability(Stable) @Nullable default String getEventBusName()
      The name of the event bus you are creating Note: If 'eventSourceName' is passed in, you cannot set this.

      Default: - automatically generated name

    • getEventSourceName

      @Stability(Stable) @Nullable default String getEventSourceName()
      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

    • builder

      @Stability(Stable) static EventBusProps.Builder builder()
      Returns:
      a EventBusProps.Builder of EventBusProps