# SingleWeightPolicyConfigProperty

Configure a policy that CloudFront uses to route requests to different origins or use different cache settings, based on the weight assigned to each option.

> This property is legacy. We recommend that you use [TrafficConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-trafficconfig.html) and specify the [SingleWeightConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-continuousdeploymentpolicy-trafficconfig.html#cfn-cloudfront-continuousdeploymentpolicy-trafficconfig-singleweightconfig) property instead.

- Source: Generated code
- Type last changed: v2.101.0 · 13 Oct 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
const singleWeightPolicyConfigProperty: cloudfront.CfnContinuousDeploymentPolicy.SingleWeightPolicyConfigProperty = {
  weight: 123,

  // the properties below are optional
  sessionStickinessConfig: {
    idleTtl: 123,
    maximumTtl: 123,
  },
};
```

## Properties

- `sessionStickinessConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnContinuousDeploymentPolicy.SessionStickinessConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnContinuousDeploymentPolicy.SessionStickinessConfigProperty.html) — Enable session stickiness for the associated origin or cache settings.

- `weight`: number (required) — The percentage of requests that CloudFront will use to send to an associated origin or cache settings.
