class TrafficRouting
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodeDeploy.TrafficRouting |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscodedeploy#TrafficRouting |
Java | software.amazon.awscdk.services.codedeploy.TrafficRouting |
Python | aws_cdk.aws_codedeploy.TrafficRouting |
TypeScript (source) | aws-cdk-lib » aws_codedeploy » TrafficRouting |
Implemented by
All
, Time
, Time
Represents how traffic is shifted during a CodeDeploy deployment.
Example
const config = new codedeploy.LambdaDeploymentConfig(this, 'CustomConfig', {
trafficRouting: new codedeploy.TimeBasedCanaryTrafficRouting({
interval: Duration.minutes(15),
percentage: 5,
}),
deploymentConfigName: 'MyDeploymentConfig',
});
Initializer
new TrafficRouting()
Methods
Name | Description |
---|---|
bind(scope) | Returns the traffic routing configuration. |
static all | Shifts 100% of traffic in a single shift. |
static time | Shifts a specified percentage of traffic, waits for a specified amount of time, then shifts the rest of traffic. |
static time | Keeps shifting a specified percentage of traffic until reaching 100%, waiting for a specified amount of time in between each traffic shift. |
bind(scope)
public bind(scope: Construct): TrafficRoutingConfig
Parameters
- scope
Construct
Returns
Returns the traffic routing configuration.
static allAtOnce()
public static allAtOnce(): TrafficRouting
Returns
Shifts 100% of traffic in a single shift.
static timeBasedCanary(props)
public static timeBasedCanary(props: TimeBasedCanaryTrafficRoutingProps): TrafficRouting
Parameters
Returns
Shifts a specified percentage of traffic, waits for a specified amount of time, then shifts the rest of traffic.
static timeBasedLinear(props)
public static timeBasedLinear(props: TimeBasedLinearTrafficRoutingProps): TrafficRouting
Parameters
Returns
Keeps shifting a specified percentage of traffic until reaching 100%, waiting for a specified amount of time in between each traffic shift.