Class RuleProps.Builder
java.lang.Object
software.amazon.awscdk.services.events.RuleProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RuleProps>
- Enclosing interface:
- RuleProps
@Stability(Stable)
public static final class RuleProps.Builder
extends Object
implements software.amazon.jsii.Builder<RuleProps>
A builder for
RuleProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofRuleProps.getDescription()Sets the value ofRuleProps.getEnabled()Sets the value ofRuleProps.getEventBus()eventPattern(EventPattern eventPattern) Sets the value ofRuleProps.getEventPattern()Sets the value ofRuleProps.getRuleName()Sets the value ofRuleProps.getSchedule()targets(List<? extends IRuleTarget> targets) Sets the value ofRuleProps.getTargets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
description
Sets the value ofRuleProps.getDescription()- Parameters:
description- A description of the rule's purpose.- Returns:
this
-
enabled
Sets the value ofRuleProps.getEnabled()- Parameters:
enabled- Indicates whether the rule is enabled.- Returns:
this
-
eventBus
Sets the value ofRuleProps.getEventBus()- Parameters:
eventBus- The event bus to associate with this rule.- Returns:
this
-
eventPattern
Sets the value ofRuleProps.getEventPattern()- Parameters:
eventPattern- Describes which events EventBridge routes to the specified target. These routed events are matched events. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide.- Returns:
this
-
ruleName
Sets the value ofRuleProps.getRuleName()- Parameters:
ruleName- A name for the rule.- Returns:
this
-
schedule
Sets the value ofRuleProps.getSchedule()- Parameters:
schedule- The schedule or rate (frequency) that determines when EventBridge runs the rule. For more information, see Schedule Expression Syntax for Rules in the Amazon EventBridge User Guide.- Returns:
this
-
targets
Sets the value ofRuleProps.getTargets()- Parameters:
targets- Targets to invoke when this rule matches an event. Input will be the full matched event. If you wish to specify custom target input, useaddTarget(target[, inputOptions]).- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<RuleProps>- Returns:
- a new instance of
RuleProps - Throws:
NullPointerException- if any required attribute was not provided
-