Class ApplicationListenerRuleProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationListenerRuleProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApplicationListenerRuleProps>
- Enclosing interface:
- ApplicationListenerRuleProps
@Stability(Stable)
public static final class ApplicationListenerRuleProps.Builder
extends Object
implements software.amazon.jsii.Builder<ApplicationListenerRuleProps>
A builder for
ApplicationListenerRuleProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction
(ListenerAction action) Sets the value ofBaseApplicationListenerRuleProps.getAction()
build()
Builds the configured instance.conditions
(List<? extends ListenerCondition> conditions) Sets the value ofBaseApplicationListenerRuleProps.getConditions()
fixedResponse
(FixedResponse fixedResponse) Deprecated.Use `action` instead.hostHeader
(String hostHeader) Deprecated.Use `conditions` instead.listener
(IApplicationListener listener) Sets the value ofApplicationListenerRuleProps.getListener()
pathPattern
(String pathPattern) Deprecated.Use `conditions` instead.pathPatterns
(List<String> pathPatterns) Deprecated.Use `conditions` instead.Sets the value ofBaseApplicationListenerRuleProps.getPriority()
redirectResponse
(RedirectResponse redirectResponse) Deprecated.Use `action` instead.targetGroups
(List<? extends IApplicationTargetGroup> targetGroups) Sets the value ofBaseApplicationListenerRuleProps.getTargetGroups()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
listener
@Stability(Stable) public ApplicationListenerRuleProps.Builder listener(IApplicationListener listener) Sets the value ofApplicationListenerRuleProps.getListener()
- Parameters:
listener
- The listener to attach the rule to. This parameter is required.- Returns:
this
-
priority
Sets the value ofBaseApplicationListenerRuleProps.getPriority()
- Parameters:
priority
- Priority of the rule. This parameter is required. The rule with the lowest priority will be used for every request.Priorities must be unique.
- Returns:
this
-
action
Sets the value ofBaseApplicationListenerRuleProps.getAction()
- Parameters:
action
- Action to perform when requests are received. Only one ofaction
,fixedResponse
,redirectResponse
ortargetGroups
can be specified.- Returns:
this
-
conditions
@Stability(Stable) public ApplicationListenerRuleProps.Builder conditions(List<? extends ListenerCondition> conditions) Sets the value ofBaseApplicationListenerRuleProps.getConditions()
- Parameters:
conditions
- Rule applies if matches the conditions.- Returns:
this
-
fixedResponse
@Stability(Deprecated) @Deprecated public ApplicationListenerRuleProps.Builder fixedResponse(FixedResponse fixedResponse) Deprecated.Use `action` instead.Sets the value ofBaseApplicationListenerRuleProps.getFixedResponse()
- Parameters:
fixedResponse
- Fixed response to return. Only one ofaction
,fixedResponse
,redirectResponse
ortargetGroups
can be specified.- Returns:
this
-
hostHeader
@Stability(Deprecated) @Deprecated public ApplicationListenerRuleProps.Builder hostHeader(String hostHeader) Deprecated.Use `conditions` instead.Sets the value ofBaseApplicationListenerRuleProps.getHostHeader()
- Parameters:
hostHeader
- Rule applies if the requested host matches the indicated host. May contain up to three '*' wildcards.- Returns:
this
-
pathPattern
@Stability(Deprecated) @Deprecated public ApplicationListenerRuleProps.Builder pathPattern(String pathPattern) Deprecated.Use `conditions` instead.Sets the value ofBaseApplicationListenerRuleProps.getPathPattern()
- Parameters:
pathPattern
- Rule applies if the requested path matches the given path pattern.- Returns:
this
-
pathPatterns
@Stability(Deprecated) @Deprecated public ApplicationListenerRuleProps.Builder pathPatterns(List<String> pathPatterns) Deprecated.Use `conditions` instead.Sets the value ofBaseApplicationListenerRuleProps.getPathPatterns()
- Parameters:
pathPatterns
- Rule applies if the requested path matches any of the given patterns. Paths may contain up to three '*' wildcards.- Returns:
this
-
redirectResponse
@Stability(Deprecated) @Deprecated public ApplicationListenerRuleProps.Builder redirectResponse(RedirectResponse redirectResponse) Deprecated.Use `action` instead.Sets the value ofBaseApplicationListenerRuleProps.getRedirectResponse()
- Parameters:
redirectResponse
- Redirect response to return. Only one ofaction
,fixedResponse
,redirectResponse
ortargetGroups
can be specified.- Returns:
this
-
targetGroups
@Stability(Stable) public ApplicationListenerRuleProps.Builder targetGroups(List<? extends IApplicationTargetGroup> targetGroups) Sets the value ofBaseApplicationListenerRuleProps.getTargetGroups()
- Parameters:
targetGroups
- Target groups to forward requests to. Only one ofaction
,fixedResponse
,redirectResponse
ortargetGroups
can be specified.Implies a
forward
action.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ApplicationListenerRuleProps>
- Returns:
- a new instance of
ApplicationListenerRuleProps
- Throws:
NullPointerException
- if any required attribute was not provided
-