public static final class AddApplicationTargetsProps.Builder
extends java.lang.Object
AddApplicationTargetsProps
Constructor and Description |
---|
Builder() |
public AddApplicationTargetsProps.Builder deregistrationDelay(Duration deregistrationDelay)
AddApplicationTargetsProps.getDeregistrationDelay()
deregistrationDelay
- The amount of time for Elastic Load Balancing to wait before deregistering a target.
The range is 0-3600 seconds.this
public AddApplicationTargetsProps.Builder healthCheck(HealthCheck healthCheck)
AddApplicationTargetsProps.getHealthCheck()
healthCheck
- Health check configuration.this
public AddApplicationTargetsProps.Builder loadBalancingAlgorithmType(TargetGroupLoadBalancingAlgorithmType loadBalancingAlgorithmType)
AddApplicationTargetsProps.getLoadBalancingAlgorithmType()
loadBalancingAlgorithmType
- The load balancing algorithm to select targets for routing requests.this
public AddApplicationTargetsProps.Builder port(java.lang.Number port)
AddApplicationTargetsProps.getPort()
port
- The port on which the listener listens for requests.this
public AddApplicationTargetsProps.Builder protocol(ApplicationProtocol protocol)
AddApplicationTargetsProps.getProtocol()
protocol
- The protocol to use.this
public AddApplicationTargetsProps.Builder protocolVersion(ApplicationProtocolVersion protocolVersion)
AddApplicationTargetsProps.getProtocolVersion()
protocolVersion
- The protocol version to use.this
public AddApplicationTargetsProps.Builder slowStart(Duration slowStart)
AddApplicationTargetsProps.getSlowStart()
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).this
public AddApplicationTargetsProps.Builder stickinessCookieDuration(Duration stickinessCookieDuration)
AddApplicationTargetsProps.getStickinessCookieDuration()
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).
this
public AddApplicationTargetsProps.Builder stickinessCookieName(java.lang.String stickinessCookieName)
AddApplicationTargetsProps.getStickinessCookieName()
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 of stickinessCookieDuration
parameter.
If stickinessCookieDuration
is not set, stickinessCookieName
will be omitted.
this
public AddApplicationTargetsProps.Builder targetGroupName(java.lang.String targetGroupName)
AddApplicationTargetsProps.getTargetGroupName()
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.this
public AddApplicationTargetsProps.Builder targets(java.util.List<? extends IApplicationLoadBalancerTarget> targets)
AddApplicationTargetsProps.getTargets()
targets
- The targets to add to this target group.
Can be Instance
, IPAddress
, or any self-registering load balancing
target. All target must be of the same type.this
public AddApplicationTargetsProps.Builder conditions(java.util.List<? extends ListenerCondition> conditions)
AddRuleProps.getConditions()
conditions
- Rule applies if matches the conditions.this
@Deprecated public AddApplicationTargetsProps.Builder hostHeader(java.lang.String hostHeader)
AddRuleProps.getHostHeader()
hostHeader
- Rule applies if the requested host matches the indicated host.
May contain up to three '*' wildcards.
Requires that priority is set.
this
@Deprecated public AddApplicationTargetsProps.Builder pathPattern(java.lang.String pathPattern)
AddRuleProps.getPathPattern()
pathPattern
- Rule applies if the requested path matches the given path pattern.
May contain up to three '*' wildcards.
Requires that priority is set.
this
@Deprecated public AddApplicationTargetsProps.Builder pathPatterns(java.util.List<java.lang.String> pathPatterns)
AddRuleProps.getPathPatterns()
pathPatterns
- Rule applies if the requested path matches any of the given patterns.
May contain up to three '*' wildcards.
Requires that priority is set.
this
public AddApplicationTargetsProps.Builder priority(java.lang.Number priority)
AddRuleProps.getPriority()
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.
this
public AddApplicationTargetsProps build()
AddApplicationTargetsProps
java.lang.NullPointerException
- if any required attribute was not provided