aws-cdk-lib.aws_cloudfront.CfnContinuousDeploymentPolicy.SingleWeightConfigProperty

interface SingleWeightConfigProperty

LanguageType name
.NETAmazon.CDK.AWS.CloudFront.CfnContinuousDeploymentPolicy.SingleWeightConfigProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#CfnContinuousDeploymentPolicy_SingleWeightConfigProperty
Javasoftware.amazon.awscdk.services.cloudfront.CfnContinuousDeploymentPolicy.SingleWeightConfigProperty
Pythonaws_cdk.aws_cloudfront.CfnContinuousDeploymentPolicy.SingleWeightConfigProperty
TypeScript aws-cdk-lib » aws_cloudfront » CfnContinuousDeploymentPolicy » SingleWeightConfigProperty

This configuration determines the percentage of HTTP requests that are sent to the staging distribution.

Example

// 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 singleWeightConfigProperty: cloudfront.CfnContinuousDeploymentPolicy.SingleWeightConfigProperty = {
  weight: 123,

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

Properties

NameTypeDescription
weightnumberThe percentage of traffic to send to a staging distribution, expressed as a decimal number between 0 and .15.
sessionStickinessConfig?IResolvable | SessionStickinessConfigPropertySession stickiness provides the ability to define multiple requests from a single viewer as a single session.

weight

Type: number

The percentage of traffic to send to a staging distribution, expressed as a decimal number between 0 and .15.


sessionStickinessConfig?

Type: IResolvable | SessionStickinessConfigProperty (optional)

Session stickiness provides the ability to define multiple requests from a single viewer as a single session.

This prevents the potentially inconsistent experience of sending some of a given user's requests to your staging distribution, while others are sent to your primary distribution. Define the session duration using TTL values.