Interface AddNetworkTargetsProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AddNetworkTargetsProps.Jsii$Proxy
Example:
Vpc vpc; AutoScalingGroup asg; ISecurityGroup sg1; ISecurityGroup sg2; // Create the load balancer in a VPC. 'internetFacing' is 'false' // by default, which creates an internal load balancer. NetworkLoadBalancer lb = NetworkLoadBalancer.Builder.create(this, "LB") .vpc(vpc) .internetFacing(true) .securityGroups(List.of(sg1)) .build(); lb.addSecurityGroup(sg2); // Add a listener on a particular port. NetworkListener listener = lb.addListener("Listener", BaseNetworkListenerProps.builder() .port(443) .build()); // Add targets on a particular port. listener.addTargets("AppFleet", AddNetworkTargetsProps.builder() .port(443) .targets(List.of(asg)) .build());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forAddNetworkTargetsProps
static final class
An implementation forAddNetworkTargetsProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Duration
The amount of time for Elastic Load Balancing to wait before deregistering a target.default HealthCheck
Health check configuration.getPort()
The port on which the target receives traffic.default Boolean
Indicates whether client IP preservation is enabled.default Protocol
Protocol for target group, expects TCP, TLS, UDP, or TCP_UDP.default Boolean
Indicates whether Proxy Protocol version 2 is enabled.default String
The name of the target group.default List<INetworkLoadBalancerTarget>
The targets to add to this target group.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPort
The port on which the target receives traffic.Default: Determined from protocol if known
-
getDeregistrationDelay
The amount of time for Elastic Load Balancing to wait before deregistering a target.The range is 0-3600 seconds.
Default: Duration.minutes(5)
-
getHealthCheck
Health check configuration.Default: - The default value for each property in this configuration varies depending on the target.
- See Also:
-
getPreserveClientIp
Indicates whether client IP preservation is enabled.Default: false if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, true.
-
getProtocol
Protocol for target group, expects TCP, TLS, UDP, or TCP_UDP.Default: - inherits the protocol of the listener
-
getProxyProtocolV2
Indicates whether Proxy Protocol version 2 is enabled.Default: false
-
getTargetGroupName
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.
Default: Automatically generated
-
getTargets
The targets to add to this target group.Can be
Instance
,IPAddress
, or any self-registering load balancing target. If you use eitherInstance
orIPAddress
as targets, all target must be of the same type. -
builder
- Returns:
- a
AddNetworkTargetsProps.Builder
ofAddNetworkTargetsProps
-