Show / Hide Table of Contents

Interface IApplicationTargetGroupProps

Properties for defining an Application Target Group.

Inherited Members
IBaseTargetGroupProps.DeregistrationDelay
IBaseTargetGroupProps.HealthCheck
IBaseTargetGroupProps.TargetGroupName
IBaseTargetGroupProps.TargetType
IBaseTargetGroupProps.Vpc
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public interface IApplicationTargetGroupProps : IBaseTargetGroupProps
Syntax (vb)
Public Interface IApplicationTargetGroupProps
    Inherits IBaseTargetGroupProps
Remarks

ExampleMetadata: infused

Examples
Vpc vpc;


// Target group with duration-based stickiness with load-balancer generated cookie
var tg1 = new ApplicationTargetGroup(this, "TG1", new ApplicationTargetGroupProps {
    TargetType = TargetType.INSTANCE,
    Port = 80,
    StickinessCookieDuration = Duration.Minutes(5),
    Vpc = vpc
});

// Target group with application-based stickiness
var tg2 = new ApplicationTargetGroup(this, "TG2", new ApplicationTargetGroupProps {
    TargetType = TargetType.INSTANCE,
    Port = 80,
    StickinessCookieDuration = Duration.Minutes(5),
    StickinessCookieName = "MyDeliciousCookie",
    Vpc = vpc
});

Synopsis

Properties

LoadBalancingAlgorithmType

The load balancing algorithm to select targets for routing requests.

Port

The port on which the listener listens for requests.

Protocol

The protocol to use.

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 listener listens for requests.

virtual Nullable<double> Port { get; }
Property Value

System.Nullable<System.Double>

Remarks

Default: - Determined from protocol if known, optional for Lambda targets.

Protocol

The protocol to use.

virtual Nullable<ApplicationProtocol> Protocol { get; }
Property Value

System.Nullable<ApplicationProtocol>

Remarks

Default: - Determined from port if known, optional for Lambda targets.

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

Duration

Remarks

The range is 30-900 seconds (15 minutes).

Default: 0

StickinessCookieDuration

The stickiness cookie expiration period.

virtual Duration StickinessCookieDuration { get; }
Property Value

Duration

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: Duration.days(1)

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.

Back to top Generated by DocFX