Skip to content
v2.277.0

CanaryTrafficRoutingConfig Struct ​

Represents the configuration specific to canary traffic shifting.

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 canaryTrafficRoutingConfig: codedeploy.CanaryTrafficRoutingConfig = {
  canaryInterval: 123,
  canaryPercentage: 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

canary_traffic_routing_config = codedeploy.CanaryTrafficRoutingConfig(
    canary_interval=123,
    canary_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.*;

CanaryTrafficRoutingConfig canaryTrafficRoutingConfig = CanaryTrafficRoutingConfig.builder()
        .canaryInterval(123)
        .canaryPercentage(123)
        .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 canaryTrafficRoutingConfig = new CanaryTrafficRoutingConfig {
    CanaryInterval = 123,
    CanaryPercentage = 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"

canaryTrafficRoutingConfig := &CanaryTrafficRoutingConfig{
	CanaryInterval: jsii.Number(123),
	CanaryPercentage: jsii.Number(123),
}

Properties ​

canaryIntervalnumbercanary_intervalint | floatcanaryIntervalNumberCanaryIntervaldoubleCanaryInterval*float64 required #
The number of minutes between the first and second traffic shifts of a `TimeBasedCanary` deployment.
canaryPercentagenumbercanary_percentageint | floatcanaryPercentageNumberCanaryPercentagedoubleCanaryPercentage*float64 required #
The percentage of traffic to shift in the first increment of a `TimeBasedCanary` deployment.