Class TrafficRouting
Represents how traffic is shifted during a CodeDeploy deployment.
Inheritance
Namespace: Amazon.CDK.AWS.CodeDeploy
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class TrafficRouting : DeputyBase
Syntax (vb)
Public MustInherit Class TrafficRouting Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
var config = new LambdaDeploymentConfig(this, "CustomConfig", new LambdaDeploymentConfigProps {
TrafficRouting = new TimeBasedCanaryTrafficRouting(new TimeBasedCanaryTrafficRoutingProps {
Interval = Duration.Minutes(15),
Percentage = 5
}),
DeploymentConfigName = "MyDeploymentConfig"
});
Synopsis
Constructors
| TrafficRouting() | Represents how traffic is shifted during a CodeDeploy deployment. |
Methods
| AllAtOnce() | Shifts 100% of traffic in a single shift. |
| Bind(Construct) | Returns the traffic routing configuration. |
| TimeBasedCanary(ITimeBasedCanaryTrafficRoutingProps) | Shifts a specified percentage of traffic, waits for a specified amount of time, then shifts the rest of traffic. |
| TimeBasedLinear(ITimeBasedLinearTrafficRoutingProps) | Keeps shifting a specified percentage of traffic until reaching 100%, waiting for a specified amount of time in between each traffic shift. |
Constructors
TrafficRouting()
Represents how traffic is shifted during a CodeDeploy deployment.
protected TrafficRouting()
Remarks
ExampleMetadata: infused
Examples
var config = new LambdaDeploymentConfig(this, "CustomConfig", new LambdaDeploymentConfigProps {
TrafficRouting = new TimeBasedCanaryTrafficRouting(new TimeBasedCanaryTrafficRoutingProps {
Interval = Duration.Minutes(15),
Percentage = 5
}),
DeploymentConfigName = "MyDeploymentConfig"
});
Methods
AllAtOnce()
Shifts 100% of traffic in a single shift.
public static TrafficRouting AllAtOnce()
Returns
Remarks
ExampleMetadata: infused
Bind(Construct)
Returns the traffic routing configuration.
public abstract ITrafficRoutingConfig Bind(Construct scope)
Parameters
- scope Construct
Returns
Remarks
ExampleMetadata: infused
TimeBasedCanary(ITimeBasedCanaryTrafficRoutingProps)
Shifts a specified percentage of traffic, waits for a specified amount of time, then shifts the rest of traffic.
public static TrafficRouting TimeBasedCanary(ITimeBasedCanaryTrafficRoutingProps props)
Parameters
Returns
Remarks
ExampleMetadata: infused
TimeBasedLinear(ITimeBasedLinearTrafficRoutingProps)
Keeps shifting a specified percentage of traffic until reaching 100%, waiting for a specified amount of time in between each traffic shift.
public static TrafficRouting TimeBasedLinear(ITimeBasedLinearTrafficRoutingProps props)
Parameters
Returns
Remarks
ExampleMetadata: infused