TrafficConfigProperty Struct
The traffic configuration of your continuous deployment.
| Source | |
|---|---|
| Type last changed |
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 trafficConfigProperty: cloudfront.CfnContinuousDeploymentPolicy.TrafficConfigProperty = {
type: 'type',
// the properties below are optional
singleHeaderConfig: {
header: 'header',
value: 'value',
},
singleWeightConfig: {
weight: 123,
// the properties below are optional
sessionStickinessConfig: {
idleTtl: 123,
maximumTtl: 123,
},
},
};
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_cloudfront as cloudfront
traffic_config_property = cloudfront.CfnContinuousDeploymentPolicy.TrafficConfigProperty(
type="type",
# the properties below are optional
single_header_config=cloudfront.CfnContinuousDeploymentPolicy.SingleHeaderConfigProperty(
header="header",
value="value"
),
single_weight_config=cloudfront.CfnContinuousDeploymentPolicy.SingleWeightConfigProperty(
weight=123,
# the properties below are optional
session_stickiness_config=cloudfront.CfnContinuousDeploymentPolicy.SessionStickinessConfigProperty(
idle_ttl=123,
maximum_ttl=123
)
)
)
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.cloudfront.*;
TrafficConfigProperty trafficConfigProperty = TrafficConfigProperty.builder()
.type("type")
// the properties below are optional
.singleHeaderConfig(SingleHeaderConfigProperty.builder()
.header("header")
.value("value")
.build())
.singleWeightConfig(SingleWeightConfigProperty.builder()
.weight(123)
// the properties below are optional
.sessionStickinessConfig(SessionStickinessConfigProperty.builder()
.idleTtl(123)
.maximumTtl(123)
.build())
.build())
.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.AWS.CloudFront;
var trafficConfigProperty = new TrafficConfigProperty {
Type = "type",
// the properties below are optional
SingleHeaderConfig = new SingleHeaderConfigProperty {
Header = "header",
Value = "value"
},
SingleWeightConfig = new SingleWeightConfigProperty {
Weight = 123,
// the properties below are optional
SessionStickinessConfig = new SessionStickinessConfigProperty {
IdleTtl = 123,
MaximumTtl = 123
}
}
};
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"
trafficConfigProperty := &TrafficConfigProperty{
Type: jsii.String("type"),
// the properties below are optional
SingleHeaderConfig: &SingleHeaderConfigProperty{
Header: jsii.String("header"),
Value: jsii.String("value"),
},
SingleWeightConfig: &SingleWeightConfigProperty{
Weight: jsii.Number(123),
// the properties below are optional
SessionStickinessConfig: &SessionStickinessConfigProperty{
IdleTtl: jsii.Number(123),
MaximumTtl: jsii.Number(123),
},
},
}
Properties
singleHeaderConfigoptionalIResolvable | CfnContinuousDeploymentPolicy.single_header_configoptionaltyping.Union[IResolvable, SingleHeaderConfigProperty]singleHeaderConfigoptionalIResolvableSingleHeaderConfigoptionalIResolvableSingleHeaderConfigoptionalinterface{} #Determines which HTTP requests are sent to the staging distribution.
singleWeightConfigoptionalIResolvable | CfnContinuousDeploymentPolicy.single_weight_configoptionaltyping.Union[IResolvable, SingleWeightConfigProperty]singleWeightConfigoptionalIResolvableSingleWeightConfigoptionalIResolvableSingleWeightConfigoptionalinterface{} #Contains the percentage of traffic to send to the staging distribution.
The type of traffic configuration.