TrafficRoutingConfig Struct
Represents the structure to pass into the underlying CfnDeploymentConfig class.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codedeploy as codedeploy } from 'aws-cdk-lib';
const trafficRoutingConfig: codedeploy.TrafficRoutingConfig = {
type: 'type',
// the properties below are optional
timeBasedCanary: {
canaryInterval: 123,
canaryPercentage: 123,
},
timeBasedLinear: {
linearInterval: 123,
linearPercentage: 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_codedeploy as codedeploy
traffic_routing_config = codedeploy.TrafficRoutingConfig(
type="type",
# the properties below are optional
time_based_canary=codedeploy.CanaryTrafficRoutingConfig(
canary_interval=123,
canary_percentage=123
),
time_based_linear=codedeploy.LinearTrafficRoutingConfig(
linear_interval=123,
linear_percentage=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.codedeploy.*;
TrafficRoutingConfig trafficRoutingConfig = TrafficRoutingConfig.builder()
.type("type")
// the properties below are optional
.timeBasedCanary(CanaryTrafficRoutingConfig.builder()
.canaryInterval(123)
.canaryPercentage(123)
.build())
.timeBasedLinear(LinearTrafficRoutingConfig.builder()
.linearInterval(123)
.linearPercentage(123)
.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.CodeDeploy;
var trafficRoutingConfig = new TrafficRoutingConfig {
Type = "type",
// the properties below are optional
TimeBasedCanary = new CanaryTrafficRoutingConfig {
CanaryInterval = 123,
CanaryPercentage = 123
},
TimeBasedLinear = new LinearTrafficRoutingConfig {
LinearInterval = 123,
LinearPercentage = 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"
trafficRoutingConfig := &TrafficRoutingConfig{
Type: jsii.String("type"),
// the properties below are optional
TimeBasedCanary: &CanaryTrafficRoutingConfig{
CanaryInterval: jsii.Number(123),
CanaryPercentage: jsii.Number(123),
},
TimeBasedLinear: &LinearTrafficRoutingConfig{
LinearInterval: jsii.Number(123),
LinearPercentage: jsii.Number(123),
},
}
Properties
timeBasedCanaryoptionalCanaryTrafficRoutingConfigtime_based_canaryoptionalCanaryTrafficRoutingConfigtimeBasedCanaryoptionalCanaryTrafficRoutingConfigTimeBasedCanaryoptionalCanaryTrafficRoutingConfigTimeBasedCanaryoptionalCanaryTrafficRoutingConfig= none#A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments.
timeBasedLinearoptionalLinearTrafficRoutingConfigtime_based_linearoptionalLinearTrafficRoutingConfigtimeBasedLinearoptionalLinearTrafficRoutingConfigTimeBasedLinearoptionalLinearTrafficRoutingConfigTimeBasedLinearoptionalLinearTrafficRoutingConfig= none#A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment.
The type of traffic shifting ( `TimeBasedCanary` or `TimeBasedLinear` ) used by a deployment configuration.