# ForwardOptions

Options for `ListenerAction.forward()`.

Used as argument in: [ListenerAction.forward](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ListenerAction.html#forward), [ListenerAction.weightedForward](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ListenerAction.html#weightedforward)

- Source: [`aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts#L232)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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)
};
```

Golang:

```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

- `stickinessDuration`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — For how long clients should be directed to the same target group.

  **Default:** No stickiness

  Range between 1 second and 7 days.
