# TargetGroupStickinessConfigProperty

Information about the target group stickiness for a rule.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
const targetGroupStickinessConfigProperty: elbv2.CfnListenerRule.TargetGroupStickinessConfigProperty = {
  durationSeconds: 123,
  enabled: false,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticloadbalancingv2 as elbv2

target_group_stickiness_config_property = elbv2.CfnListenerRule.TargetGroupStickinessConfigProperty(
    duration_seconds=123,
    enabled=False
)
```

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.services.elasticloadbalancingv2.*;

TargetGroupStickinessConfigProperty targetGroupStickinessConfigProperty = TargetGroupStickinessConfigProperty.builder()
        .durationSeconds(123)
        .enabled(false)
        .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.AWS.ElasticLoadBalancingV2;

var targetGroupStickinessConfigProperty = new TargetGroupStickinessConfigProperty {
    DurationSeconds = 123,
    Enabled = false
};
```

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 "github.com/aws/aws-cdk-go/awscdk"

targetGroupStickinessConfigProperty := &TargetGroupStickinessConfigProperty{
	DurationSeconds: jsii.Number(123),
	Enabled: jsii.Boolean(false),
}
```

## Properties

- `durationSeconds`: number — [Application Load Balancers] The time period, in seconds, during which requests from a client should be routed to the same target group.

  The range is 1-604800 seconds (7 days). You must specify this value when enabling target group stickiness.

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether target group stickiness is enabled.
