Class ApplicationListenerRule.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationListenerRule.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApplicationListenerRule>
- Enclosing class:
ApplicationListenerRule
@Stability(Stable)
public static final class ApplicationListenerRule.Builder
extends Object
implements software.amazon.jsii.Builder<ApplicationListenerRule>
A fluent builder for
ApplicationListenerRule
.-
Method Summary
Modifier and TypeMethodDescriptionaction
(ListenerAction action) Action to perform when requests are received.build()
conditions
(List<? extends ListenerCondition> conditions) Rule applies if matches the conditions.listener
(IApplicationListener listener) The listener to attach the rule to.Priority of the rule.targetGroups
(List<? extends IApplicationTargetGroup> targetGroups) Target groups to forward requests to.
-
Method Details
-
create
@Stability(Stable) public static ApplicationListenerRule.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ApplicationListenerRule.Builder
.
-
priority
Priority of the rule.The rule with the lowest priority will be used for every request.
Priorities must be unique.
- Parameters:
priority
- Priority of the rule. This parameter is required.- Returns:
this
-
action
Action to perform when requests are received.Only one of
action
,fixedResponse
,redirectResponse
ortargetGroups
can be specified.Default: - No action
- Parameters:
action
- Action to perform when requests are received. This parameter is required.- Returns:
this
-
conditions
@Stability(Stable) public ApplicationListenerRule.Builder conditions(List<? extends ListenerCondition> conditions) Rule applies if matches the conditions.Default: - No conditions.
- Parameters:
conditions
- Rule applies if matches the conditions. This parameter is required.- Returns:
this
- See Also:
-
targetGroups
@Stability(Stable) public ApplicationListenerRule.Builder targetGroups(List<? extends IApplicationTargetGroup> targetGroups) Target groups to forward requests to.Only one of
action
,fixedResponse
,redirectResponse
ortargetGroups
can be specified.Implies a
forward
action.Default: - No target groups.
- Parameters:
targetGroups
- Target groups to forward requests to. This parameter is required.- Returns:
this
-
listener
The listener to attach the rule to.- Parameters:
listener
- The listener to attach the rule to. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ApplicationListenerRule>
- Returns:
- a newly built instance of
ApplicationListenerRule
.
-