Skip to content
v2.278.0

NetworkForwardOptions Struct ​

Options for NetworkListenerAction.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 networkForwardOptions: elbv2.NetworkForwardOptions = {
  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

network_forward_options = elbv2.NetworkForwardOptions(
    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.*;

NetworkForwardOptions networkForwardOptions = NetworkForwardOptions.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 networkForwardOptions = new NetworkForwardOptions {
    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"

networkForwardOptions := &NetworkForwardOptions{
	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.