Class AddApplicationTargetsProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.AddApplicationTargetsProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AddApplicationTargetsProps>
- Enclosing interface:
AddApplicationTargetsProps
@Stability(Stable)
public static final class AddApplicationTargetsProps.Builder
extends Object
implements software.amazon.jsii.Builder<AddApplicationTargetsProps>
A builder for
AddApplicationTargetsProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.conditions
(List<? extends ListenerCondition> conditions) Sets the value ofAddRuleProps.getConditions()
deregistrationDelay
(Duration deregistrationDelay) Sets the value ofAddApplicationTargetsProps.getDeregistrationDelay()
healthCheck
(HealthCheck healthCheck) Sets the value ofAddApplicationTargetsProps.getHealthCheck()
hostHeader
(String hostHeader) Deprecated.Use `conditions` instead.loadBalancingAlgorithmType
(TargetGroupLoadBalancingAlgorithmType loadBalancingAlgorithmType) Sets the value ofAddApplicationTargetsProps.getLoadBalancingAlgorithmType()
pathPattern
(String pathPattern) Deprecated.Use `conditions` instead.pathPatterns
(List<String> pathPatterns) Deprecated.Use `conditions` instead.Sets the value ofAddApplicationTargetsProps.getPort()
Sets the value ofAddRuleProps.getPriority()
protocol
(ApplicationProtocol protocol) Sets the value ofAddApplicationTargetsProps.getProtocol()
protocolVersion
(ApplicationProtocolVersion protocolVersion) Sets the value ofAddApplicationTargetsProps.getProtocolVersion()
Sets the value ofAddApplicationTargetsProps.getSlowStart()
stickinessCookieDuration
(Duration stickinessCookieDuration) Sets the value ofAddApplicationTargetsProps.getStickinessCookieDuration()
stickinessCookieName
(String stickinessCookieName) Sets the value ofAddApplicationTargetsProps.getStickinessCookieName()
targetGroupName
(String targetGroupName) Sets the value ofAddApplicationTargetsProps.getTargetGroupName()
targets
(List<? extends IApplicationLoadBalancerTarget> targets) Sets the value ofAddApplicationTargetsProps.getTargets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
deregistrationDelay
@Stability(Stable) public AddApplicationTargetsProps.Builder deregistrationDelay(Duration deregistrationDelay) Sets the value ofAddApplicationTargetsProps.getDeregistrationDelay()
- Parameters:
deregistrationDelay
- The amount of time for Elastic Load Balancing to wait before deregistering a target. The range is 0-3600 seconds.- Returns:
this
-
healthCheck
Sets the value ofAddApplicationTargetsProps.getHealthCheck()
- Parameters:
healthCheck
- Health check configuration.- Returns:
this
-
loadBalancingAlgorithmType
@Stability(Stable) public AddApplicationTargetsProps.Builder loadBalancingAlgorithmType(TargetGroupLoadBalancingAlgorithmType loadBalancingAlgorithmType) Sets the value ofAddApplicationTargetsProps.getLoadBalancingAlgorithmType()
- Parameters:
loadBalancingAlgorithmType
- The load balancing algorithm to select targets for routing requests.- Returns:
this
-
port
Sets the value ofAddApplicationTargetsProps.getPort()
- Parameters:
port
- The port on which the listener listens for requests.- Returns:
this
-
protocol
Sets the value ofAddApplicationTargetsProps.getProtocol()
- Parameters:
protocol
- The protocol to use.- Returns:
this
-
protocolVersion
@Stability(Stable) public AddApplicationTargetsProps.Builder protocolVersion(ApplicationProtocolVersion protocolVersion) Sets the value ofAddApplicationTargetsProps.getProtocolVersion()
- Parameters:
protocolVersion
- The protocol version to use.- Returns:
this
-
slowStart
Sets the value ofAddApplicationTargetsProps.getSlowStart()
- Parameters:
slowStart
- The time period during which the load balancer sends a newly registered target a linearly increasing share of the traffic to the target group. The range is 30-900 seconds (15 minutes).- Returns:
this
-
stickinessCookieDuration
@Stability(Stable) public AddApplicationTargetsProps.Builder stickinessCookieDuration(Duration stickinessCookieDuration) Sets the value ofAddApplicationTargetsProps.getStickinessCookieDuration()
- Parameters:
stickinessCookieDuration
- The stickiness cookie expiration period. Setting this value enables load balancer stickiness.After this period, the cookie is considered stale. The minimum value is 1 second and the maximum value is 7 days (604800 seconds).
- Returns:
this
-
stickinessCookieName
@Stability(Stable) public AddApplicationTargetsProps.Builder stickinessCookieName(String stickinessCookieName) Sets the value ofAddApplicationTargetsProps.getStickinessCookieName()
- Parameters:
stickinessCookieName
- The name of an application-based stickiness cookie. Names that start with the following prefixes are not allowed: AWSALB, AWSALBAPP, and AWSALBTG; they're reserved for use by the load balancer.Note:
stickinessCookieName
parameter depends on the presence ofstickinessCookieDuration
parameter. IfstickinessCookieDuration
is not set,stickinessCookieName
will be omitted.- Returns:
this
-
targetGroupName
@Stability(Stable) public AddApplicationTargetsProps.Builder targetGroupName(String targetGroupName) Sets the value ofAddApplicationTargetsProps.getTargetGroupName()
- Parameters:
targetGroupName
- The name of the target group. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.- Returns:
this
-
targets
@Stability(Stable) public AddApplicationTargetsProps.Builder targets(List<? extends IApplicationLoadBalancerTarget> targets) Sets the value ofAddApplicationTargetsProps.getTargets()
- Parameters:
targets
- The targets to add to this target group. Can beInstance
,IPAddress
, or any self-registering load balancing target. All target must be of the same type.- Returns:
this
-
conditions
@Stability(Stable) public AddApplicationTargetsProps.Builder conditions(List<? extends ListenerCondition> conditions) Sets the value ofAddRuleProps.getConditions()
- Parameters:
conditions
- Rule applies if matches the conditions.- Returns:
this
-
hostHeader
@Stability(Deprecated) @Deprecated public AddApplicationTargetsProps.Builder hostHeader(String hostHeader) Deprecated.Use `conditions` instead.Sets the value ofAddRuleProps.getHostHeader()
- Parameters:
hostHeader
- Rule applies if the requested host matches the indicated host. May contain up to three '*' wildcards.Requires that priority is set.
- Returns:
this
-
pathPattern
@Stability(Deprecated) @Deprecated public AddApplicationTargetsProps.Builder pathPattern(String pathPattern) Deprecated.Use `conditions` instead.Sets the value ofAddRuleProps.getPathPattern()
- Parameters:
pathPattern
- Rule applies if the requested path matches the given path pattern. May contain up to three '*' wildcards.Requires that priority is set.
- Returns:
this
-
pathPatterns
@Stability(Deprecated) @Deprecated public AddApplicationTargetsProps.Builder pathPatterns(List<String> pathPatterns) Deprecated.Use `conditions` instead.Sets the value ofAddRuleProps.getPathPatterns()
- Parameters:
pathPatterns
- Rule applies if the requested path matches any of the given patterns. May contain up to three '*' wildcards.Requires that priority is set.
- Returns:
this
-
priority
Sets the value ofAddRuleProps.getPriority()
- Parameters:
priority
- Priority of this target group. The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions.Priorities must be unique.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AddApplicationTargetsProps>
- Returns:
- a new instance of
AddApplicationTargetsProps
- Throws:
NullPointerException
- if any required attribute was not provided
-