Class AddNetworkTargetsProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.AddNetworkTargetsProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AddNetworkTargetsProps>
- Enclosing interface:
AddNetworkTargetsProps
@Stability(Stable)
public static final class AddNetworkTargetsProps.Builder
extends Object
implements software.amazon.jsii.Builder<AddNetworkTargetsProps>
A builder for
AddNetworkTargetsProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deregistrationDelay
(Duration deregistrationDelay) Sets the value ofAddNetworkTargetsProps.getDeregistrationDelay()
healthCheck
(HealthCheck healthCheck) Sets the value ofAddNetworkTargetsProps.getHealthCheck()
Sets the value ofAddNetworkTargetsProps.getPort()
preserveClientIp
(Boolean preserveClientIp) Sets the value ofAddNetworkTargetsProps.getPreserveClientIp()
Sets the value ofAddNetworkTargetsProps.getProtocol()
proxyProtocolV2
(Boolean proxyProtocolV2) Sets the value ofAddNetworkTargetsProps.getProxyProtocolV2()
targetGroupName
(String targetGroupName) Sets the value ofAddNetworkTargetsProps.getTargetGroupName()
targets
(List<? extends INetworkLoadBalancerTarget> targets) Sets the value ofAddNetworkTargetsProps.getTargets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
port
Sets the value ofAddNetworkTargetsProps.getPort()
- Parameters:
port
- The port on which the target receives traffic. This parameter is required.- Returns:
this
-
deregistrationDelay
@Stability(Stable) public AddNetworkTargetsProps.Builder deregistrationDelay(Duration deregistrationDelay) Sets the value ofAddNetworkTargetsProps.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 ofAddNetworkTargetsProps.getHealthCheck()
- Parameters:
healthCheck
- Health check configuration.- Returns:
this
-
preserveClientIp
Sets the value ofAddNetworkTargetsProps.getPreserveClientIp()
- Parameters:
preserveClientIp
- Indicates whether client IP preservation is enabled.- Returns:
this
-
protocol
Sets the value ofAddNetworkTargetsProps.getProtocol()
- Parameters:
protocol
- Protocol for target group, expects TCP, TLS, UDP, or TCP_UDP.- Returns:
this
-
proxyProtocolV2
Sets the value ofAddNetworkTargetsProps.getProxyProtocolV2()
- Parameters:
proxyProtocolV2
- Indicates whether Proxy Protocol version 2 is enabled.- Returns:
this
-
targetGroupName
Sets the value ofAddNetworkTargetsProps.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 AddNetworkTargetsProps.Builder targets(List<? extends INetworkLoadBalancerTarget> targets) Sets the value ofAddNetworkTargetsProps.getTargets()
- Parameters:
targets
- The targets to add to this target group. Can beInstance
,IPAddress
, or any self-registering load balancing target. If you use eitherInstance
orIPAddress
as targets, all target must be of the same type.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AddNetworkTargetsProps>
- Returns:
- a new instance of
AddNetworkTargetsProps
- Throws:
NullPointerException
- if any required attribute was not provided
-