Define a Network Target Group.
import { NetworkTargetGroup } from 'aws-cdk-lib/aws-elasticloadbalancingv2';Or use the module namespace:
import * as elasticloadbalancingv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';
// elasticloadbalancingv2.NetworkTargetGroupConfiguration passed to the constructor as NetworkTargetGroupProps.
portRequirednumberThe port on which the target receives traffic.
connectionTerminationOptionalbooleanIndicates whether the load balancer terminates connections at the end of the deregistration timeout.
Default: false
preserveClientIpOptionalbooleanIndicates 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.
protocolOptionalProtocolProtocol for target group, expects TCP, TLS, UDP, or TCP_UDP.
Default: - TCP
proxyProtocolV2OptionalbooleanIndicates whether Proxy Protocol version 2 is enabled.
Default: false
targetsOptionalINetworkLoadBalancerTarget[]The targets to add to this target group. Can be `Instance`, `IPAddress`, or any self-registering load balancing target. If you use either `Instance` or `IPAddress` as targets, all target must be of the same type.
Default: - No targets.
BaseTargetGroupPropscrossZoneEnabledOptionalinherited from BaseTargetGroupPropsbooleanIndicates whether cross zone load balancing is enabled.
Default: - use load balancer configuration
deregistrationDelayOptionalinherited from BaseTargetGroupPropsDurationThe amount of time for Elastic Load Balancing to wait before deregistering a target. The range is 0-3600 seconds.
Default: 300
healthCheckOptionalinherited from BaseTargetGroupPropsHealthCheckHealth check configuration.
Default: - The default value for each property in this configuration varies depending on the target.
ipAddressTypeOptionalinherited from BaseTargetGroupPropsTargetGroupIpAddressTypeThe type of IP addresses of the targets registered with the target group.
Default: undefined - ELB defaults to IPv4
targetGroupHealthOptionalinherited from BaseTargetGroupPropsTargetGroupHealthConfiguring target group health.
Default: - use default configuration
targetGroupNameOptionalinherited from BaseTargetGroupPropsstringThe 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.
targetTypeOptionalinherited from BaseTargetGroupPropsTargetTypeThe type of targets registered to this TargetGroup, either IP or Instance. All targets registered into the group must be of this type. If you register targets to the TargetGroup in the CDK app, the TargetType is determined automatically.
Default: - Determined automatically.
vpcOptionalinherited from BaseTargetGroupPropsIVpcThe virtual private cloud (VPC). only if `TargetType` is `Ip` or `InstanceId`
Default: - undefined
Everything you need to know about Elastic Load Balancing V2 on one page. HD quality, print-friendly.
Download Free Infographicaws-elasticloadbalancingv2