Skip to content
v2.277.0

ForwardOptions Struct ​

Options for ListenerAction.forward().

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
const forwardOptions: elbv2.ForwardOptions = {
  stickinessDuration: cdk.Duration.minutes(30),
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_elasticloadbalancingv2 as elbv2

forward_options = elbv2.ForwardOptions(
    stickiness_duration=cdk.Duration.minutes(30)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.elasticloadbalancingv2.*;

ForwardOptions forwardOptions = ForwardOptions.builder()
        .stickinessDuration(Duration.minutes(30))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.ElasticLoadBalancingV2;

var forwardOptions = new ForwardOptions {
    StickinessDuration = Duration.Minutes(30)
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

forwardOptions := &ForwardOptions{
	StickinessDuration: cdk.Duration_Minutes(jsii.Number(30)),
}

Properties ​

stickinessDurationoptionalDurationstickiness_durationoptionalDurationstickinessDurationoptionalDurationStickinessDurationoptionalDurationStickinessDurationoptionalDuration#
For how long clients should be directed to the same target group.

Default: No stickiness

Range between 1 second and 7 days.