Interface NetworkTargetGroupProps
- All Superinterfaces:
BaseTargetGroupProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
NetworkTargetGroupProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:44.387Z")
@Stability(Stable)
public interface NetworkTargetGroupProps
extends software.amazon.jsii.JsiiSerializable, BaseTargetGroupProps
Properties for a new Network Target Group.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.elasticloadbalancingv2.*;
import software.amazon.awscdk.core.*;
INetworkLoadBalancerTarget networkLoadBalancerTarget;
Vpc vpc;
NetworkTargetGroupProps networkTargetGroupProps = NetworkTargetGroupProps.builder()
.port(123)
// the properties below are optional
.deregistrationDelay(Duration.minutes(30))
.healthCheck(HealthCheck.builder()
.enabled(false)
.healthyGrpcCodes("healthyGrpcCodes")
.healthyHttpCodes("healthyHttpCodes")
.healthyThresholdCount(123)
.interval(Duration.minutes(30))
.path("path")
.port("port")
.protocol(Protocol.HTTP)
.timeout(Duration.minutes(30))
.unhealthyThresholdCount(123)
.build())
.preserveClientIp(false)
.protocol(Protocol.HTTP)
.proxyProtocolV2(false)
.targetGroupName("targetGroupName")
.targets(List.of(networkLoadBalancerTarget))
.targetType(TargetType.INSTANCE)
.vpc(vpc)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forNetworkTargetGroupPropsstatic final classAn implementation forNetworkTargetGroupProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()getPort()The port on which the listener listens for requests.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
getDeregistrationDelay, getHealthCheck, getTargetGroupName, getTargetType, getVpcMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPort
The port on which the listener listens for requests. -
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
-