Interface INetworkTargetGroupProps
Properties for a new Network Target Group.
Inherited Members
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public interface INetworkTargetGroupProps : IBaseTargetGroupProps
Syntax (vb)
Public Interface INetworkTargetGroupProps
Inherits IBaseTargetGroupProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
using Amazon.CDK;
INetworkLoadBalancerTarget networkLoadBalancerTarget;
Vpc vpc;
var networkTargetGroupProps = new NetworkTargetGroupProps {
Port = 123,
// the properties below are optional
DeregistrationDelay = Duration.Minutes(30),
HealthCheck = new HealthCheck {
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
},
PreserveClientIp = false,
Protocol = Protocol.HTTP,
ProxyProtocolV2 = false,
TargetGroupName = "targetGroupName",
Targets = new [] { networkLoadBalancerTarget },
TargetType = TargetType.INSTANCE,
Vpc = vpc
};
Synopsis
Properties
Port | The port on which the listener listens for requests. |
PreserveClientIp | Indicates whether client IP preservation is enabled. |
Protocol | Protocol for target group, expects TCP, TLS, UDP, or TCP_UDP. |
ProxyProtocolV2 | Indicates whether Proxy Protocol version 2 is enabled. |
Targets | The targets to add to this target group. |
Properties
Port
The port on which the listener listens for requests.
double Port { get; }
Property Value
System.Double
PreserveClientIp
Indicates whether client IP preservation is enabled.
virtual Nullable<bool> PreserveClientIp { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, true.
Protocol
Protocol for target group, expects TCP, TLS, UDP, or TCP_UDP.
virtual Nullable<Protocol> Protocol { get; }
Property Value
System.Nullable<Protocol>
Remarks
Default: - TCP
ProxyProtocolV2
Indicates whether Proxy Protocol version 2 is enabled.
virtual Nullable<bool> ProxyProtocolV2 { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Targets
The targets to add to this target group.
virtual INetworkLoadBalancerTarget[] Targets { get; }
Property Value
Remarks
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.