Interface RuleProps
- All Superinterfaces:
EventCommonOptions,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
RuleProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.110.0 (build 336b265)",
date="2025-04-22T23:08:13.630Z")
@Stability(Stable)
public interface RuleProps
extends software.amazon.jsii.JsiiSerializable, EventCommonOptions
Properties for defining an EventBridge Rule.
Example:
import software.amazon.awscdk.services.redshiftserverless.*;
CfnWorkgroup workgroup;
Rule rule = Rule.Builder.create(this, "Rule")
.schedule(Schedule.rate(Duration.hours(1)))
.build();
Queue dlq = new Queue(this, "DeadLetterQueue");
rule.addTarget(RedshiftQuery.Builder.create(workgroup.getAttrWorkgroupWorkgroupArn())
.database("dev")
.deadLetterQueue(dlq)
.sql(List.of("SELECT * FROM foo", "SELECT * FROM baz"))
.build());
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic RuleProps.Builderbuilder()default BooleanIndicates whether the rule is enabled.default IEventBusThe event bus to associate with this rule.default ScheduleThe schedule or rate (frequency) that determines when EventBridge runs the rule.default List<IRuleTarget>Targets to invoke when this rule matches an event.Methods inherited from interface software.amazon.awscdk.services.events.EventCommonOptions
getCrossStackScope, getDescription, getEventPattern, getRuleNameMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEnabled
Indicates whether the rule is enabled.Default: true
-
getEventBus
The event bus to associate with this rule.Default: - The default event bus.
-
getSchedule
The schedule or rate (frequency) that determines when EventBridge runs the rule.You must specify this property, the
eventPatternproperty, or both.For more information, see Schedule Expression Syntax for Rules in the Amazon EventBridge User Guide.
Default: - None.
- See Also:
-
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
- Returns:
- a
RuleProps.BuilderofRuleProps
-