Class TrafficRoutingConfig.Builder
java.lang.Object
software.amazon.awscdk.services.codedeploy.TrafficRoutingConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<TrafficRoutingConfig>
- Enclosing interface:
TrafficRoutingConfig
@Stability(Stable)
public static final class TrafficRoutingConfig.Builder
extends Object
implements software.amazon.jsii.Builder<TrafficRoutingConfig>
A builder for
TrafficRoutingConfig-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.timeBasedCanary(CanaryTrafficRoutingConfig timeBasedCanary) Sets the value ofTrafficRoutingConfig.getTimeBasedCanary()timeBasedLinear(LinearTrafficRoutingConfig timeBasedLinear) Sets the value ofTrafficRoutingConfig.getTimeBasedLinear()Sets the value ofTrafficRoutingConfig.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Sets the value ofTrafficRoutingConfig.getType()- Parameters:
type- The type of traffic shifting (TimeBasedCanaryorTimeBasedLinear) used by a deployment configuration. This parameter is required.- Returns:
this
-
timeBasedCanary
@Stability(Stable) public TrafficRoutingConfig.Builder timeBasedCanary(CanaryTrafficRoutingConfig timeBasedCanary) Sets the value ofTrafficRoutingConfig.getTimeBasedCanary()- Parameters:
timeBasedCanary- A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments.- Returns:
this
-
timeBasedLinear
@Stability(Stable) public TrafficRoutingConfig.Builder timeBasedLinear(LinearTrafficRoutingConfig timeBasedLinear) Sets the value ofTrafficRoutingConfig.getTimeBasedLinear()- Parameters:
timeBasedLinear- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TrafficRoutingConfig>- Returns:
- a new instance of
TrafficRoutingConfig - Throws:
NullPointerException- if any required attribute was not provided
-