Interface RuleProps

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.250Z") @Stability(Stable) public interface RuleProps extends, EventCommonOptions
Properties for defining an EventBridge Rule.


 Function fn = Function.Builder.create(this, "MyFunc")
         .code(Code.fromInline("exports.handler = handler.toString()"))
 Rule rule = Rule.Builder.create(this, "rule")
 Queue queue = new Queue(this, "Queue");
         .deadLetterQueue(queue) // Optional: add a dead letter queue
         .maxEventAge(Duration.hours(2)) // Optional: set the maxEventAge retry policy
  • Method Details

    • getEnabled

      @Stability(Stable) @Nullable default Boolean getEnabled()
      Indicates whether the rule is enabled.

      Default: true

    • getEventBus

      @Stability(Stable) @Nullable default IEventBus getEventBus()
      The event bus to associate with this rule.

      Default: - The default event bus.

    • getSchedule

      @Stability(Stable) @Nullable default Schedule getSchedule()
      The schedule or rate (frequency) that determines when EventBridge runs the rule.

      You must specify this property, the eventPattern property, or both.

      For more information, see Schedule Expression Syntax for Rules in the Amazon EventBridge User Guide.

      Default: - None.

      See Also:
    • getTargets

      @Stability(Stable) @Nullable default List<IRuleTarget> getTargets()
      Targets to invoke when this rule matches an event.

      Input will be the full matched event. If you wish to specify custom target input, use addTarget(target[, inputOptions]).

      Default: - No targets.

    • builder

      @Stability(Stable) static RuleProps.Builder builder()
      a RuleProps.Builder of RuleProps