Interface NetworkTargetGroupProps
- All Superinterfaces:
BaseTargetGroupProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
NetworkTargetGroupProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:52.123Z")
@Stability(Stable)
public interface NetworkTargetGroupProps
extends software.amazon.jsii.JsiiSerializable, BaseTargetGroupProps
Properties for a new Network Target Group.
Example:
Vpc vpc;
ApplicationTargetGroup ipv4ApplicationTargetGroup = ApplicationTargetGroup.Builder.create(this, "IPv4ApplicationTargetGroup")
.vpc(vpc)
.port(80)
.targetType(TargetType.INSTANCE)
.ipAddressType(TargetGroupIpAddressType.IPV4)
.build();
ApplicationTargetGroup ipv6ApplicationTargetGroup = ApplicationTargetGroup.Builder.create(this, "Ipv6ApplicationTargetGroup")
.vpc(vpc)
.port(80)
.targetType(TargetType.INSTANCE)
.ipAddressType(TargetGroupIpAddressType.IPV6)
.build();
NetworkTargetGroup ipv4NetworkTargetGroup = NetworkTargetGroup.Builder.create(this, "IPv4NetworkTargetGroup")
.vpc(vpc)
.port(80)
.targetType(TargetType.INSTANCE)
.ipAddressType(TargetGroupIpAddressType.IPV4)
.build();
NetworkTargetGroup ipv6NetworkTargetGroup = NetworkTargetGroup.Builder.create(this, "Ipv6NetworkTargetGroup")
.vpc(vpc)
.port(80)
.targetType(TargetType.INSTANCE)
.ipAddressType(TargetGroupIpAddressType.IPV6)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forNetworkTargetGroupPropsstatic final classAn implementation forNetworkTargetGroupProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanIndicates whether the load balancer terminates connections at the end of the deregistration timeout.getPort()The port on which the target receives traffic.default BooleanIndicates whether client IP preservation is enabled.default ProtocolProtocol for target group, expects TCP, TLS, UDP, or TCP_UDP.default BooleanIndicates whether Proxy Protocol version 2 is enabled.default List<INetworkLoadBalancerTarget> The targets to add to this target group.Methods inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.BaseTargetGroupProps
getCrossZoneEnabled, getDeregistrationDelay, getHealthCheck, getIpAddressType, getTargetGroupHealth, getTargetGroupName, getTargetType, getVpcMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPort
The port on which the target receives traffic. -
getConnectionTermination
Indicates whether the load balancer terminates connections at the end of the deregistration timeout.Default: false
-
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: - TCP
-
getProxyProtocolV2
Indicates whether Proxy Protocol version 2 is enabled.Default: false
-
getTargets
The targets to add to this target group.Can be
Instance,IPAddress, or any self-registering load balancing target. If you use eitherInstanceorIPAddressas targets, all target must be of the same type.Default: - No targets.
-
builder
- Returns:
- a
NetworkTargetGroupProps.BuilderofNetworkTargetGroupProps
-