Interface IApplicationTargetGroupProps
Properties for defining an Application Target Group.
Inherited Members
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IApplicationTargetGroupProps : IBaseTargetGroupProps
Syntax (vb)
Public Interface IApplicationTargetGroupProps
Inherits IBaseTargetGroupProps
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
var tg = new ApplicationTargetGroup(this, "TG", new ApplicationTargetGroupProps {
TargetType = TargetType.IP,
Port = 50051,
Protocol = ApplicationProtocol.HTTP,
ProtocolVersion = ApplicationProtocolVersion.GRPC,
HealthCheck = new HealthCheck {
Enabled = true,
HealthyGrpcCodes = "0-99"
},
Vpc = vpc
});
Synopsis
Properties
LoadBalancingAlgorithmType | The load balancing algorithm to select targets for routing requests. |
Port | The port on which the target receives traffic. |
Protocol | The protocol used for communication with the target. |
ProtocolVersion | The protocol version to use. |
SlowStart | The time period during which the load balancer sends a newly registered target a linearly increasing share of the traffic to the target group. |
StickinessCookieDuration | The stickiness cookie expiration period. |
StickinessCookieName | The name of an application-based stickiness cookie. |
Targets | The targets to add to this target group. |
Properties
LoadBalancingAlgorithmType
The load balancing algorithm to select targets for routing requests.
virtual Nullable<TargetGroupLoadBalancingAlgorithmType> LoadBalancingAlgorithmType { get; }
Property Value
System.Nullable<TargetGroupLoadBalancingAlgorithmType>
Remarks
Default: TargetGroupLoadBalancingAlgorithmType.ROUND_ROBIN
Port
The port on which the target receives traffic.
virtual Nullable<double> Port { get; }
Property Value
System.Nullable<System.Double>
Remarks
This is not applicable for Lambda targets.
Default: - Determined from protocol if known
Protocol
The protocol used for communication with the target.
virtual Nullable<ApplicationProtocol> Protocol { get; }
Property Value
System.Nullable<ApplicationProtocol>
Remarks
This is not applicable for Lambda targets.
Default: - Determined from port if known
ProtocolVersion
The protocol version to use.
virtual Nullable<ApplicationProtocolVersion> ProtocolVersion { get; }
Property Value
System.Nullable<ApplicationProtocolVersion>
Remarks
Default: ApplicationProtocolVersion.HTTP1
SlowStart
The time period during which the load balancer sends a newly registered target a linearly increasing share of the traffic to the target group.
virtual Duration SlowStart { get; }
Property Value
Remarks
The range is 30-900 seconds (15 minutes).
Default: 0
StickinessCookieDuration
The stickiness cookie expiration period.
virtual Duration StickinessCookieDuration { get; }
Property Value
Remarks
Setting this value enables load balancer stickiness.
After this period, the cookie is considered stale. The minimum value is 1 second and the maximum value is 7 days (604800 seconds).
Default: - Stickiness is disabled
StickinessCookieName
The name of an application-based stickiness cookie.
virtual string StickinessCookieName { get; }
Property Value
System.String
Remarks
Names that start with the following prefixes are not allowed: AWSALB, AWSALBAPP, and AWSALBTG; they're reserved for use by the load balancer.
Note: stickinessCookieName
parameter depends on the presence of stickinessCookieDuration
parameter.
If stickinessCookieDuration
is not set, stickinessCookieName
will be omitted.
Default: - If stickinessCookieDuration
is set, a load-balancer generated cookie is used. Otherwise, no stickiness is defined.
See: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html
Targets
The targets to add to this target group.
virtual IApplicationLoadBalancerTarget[] Targets { get; }
Property Value
IApplicationLoadBalancerTarget[]
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.