Class CfnEndpoint.TrafficRoutingConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.sagemaker.CfnEndpoint.TrafficRoutingConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEndpoint.TrafficRoutingConfigProperty>
- Enclosing interface:
CfnEndpoint.TrafficRoutingConfigProperty
@Stability(Stable)
public static final class CfnEndpoint.TrafficRoutingConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnEndpoint.TrafficRoutingConfigProperty>
A builder for
CfnEndpoint.TrafficRoutingConfigProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.canarySize
(IResolvable canarySize) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getCanarySize()
canarySize
(CfnEndpoint.CapacitySizeProperty canarySize) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getCanarySize()
linearStepSize
(IResolvable linearStepSize) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getLinearStepSize()
linearStepSize
(CfnEndpoint.CapacitySizeProperty linearStepSize) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getLinearStepSize()
Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getType()
waitIntervalInSeconds
(Number waitIntervalInSeconds) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getWaitIntervalInSeconds()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getType()
- Parameters:
type
- Traffic routing strategy type. This parameter is required.ALL_AT_ONCE
: Endpoint traffic shifts to the new fleet in a single step.CANARY
: Endpoint traffic shifts to the new fleet in two steps. The first step is the canary, which is a small portion of the traffic. The second step is the remainder of the traffic.LINEAR
: Endpoint traffic shifts to the new fleet in n steps of a configurable size.
- Returns:
this
-
canarySize
@Stability(Stable) public CfnEndpoint.TrafficRoutingConfigProperty.Builder canarySize(IResolvable canarySize) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getCanarySize()
- Parameters:
canarySize
- Batch size for the first step to turn on traffic on the new endpoint fleet.Value
must be less than or equal to 50% of the variant's total instance count.- Returns:
this
-
canarySize
@Stability(Stable) public CfnEndpoint.TrafficRoutingConfigProperty.Builder canarySize(CfnEndpoint.CapacitySizeProperty canarySize) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getCanarySize()
- Parameters:
canarySize
- Batch size for the first step to turn on traffic on the new endpoint fleet.Value
must be less than or equal to 50% of the variant's total instance count.- Returns:
this
-
linearStepSize
@Stability(Stable) public CfnEndpoint.TrafficRoutingConfigProperty.Builder linearStepSize(IResolvable linearStepSize) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getLinearStepSize()
- Parameters:
linearStepSize
- Batch size for each step to turn on traffic on the new endpoint fleet.Value
must be 10-50% of the variant's total instance count.- Returns:
this
-
linearStepSize
@Stability(Stable) public CfnEndpoint.TrafficRoutingConfigProperty.Builder linearStepSize(CfnEndpoint.CapacitySizeProperty linearStepSize) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getLinearStepSize()
- Parameters:
linearStepSize
- Batch size for each step to turn on traffic on the new endpoint fleet.Value
must be 10-50% of the variant's total instance count.- Returns:
this
-
waitIntervalInSeconds
@Stability(Stable) public CfnEndpoint.TrafficRoutingConfigProperty.Builder waitIntervalInSeconds(Number waitIntervalInSeconds) Sets the value ofCfnEndpoint.TrafficRoutingConfigProperty.getWaitIntervalInSeconds()
- Parameters:
waitIntervalInSeconds
- The waiting time (in seconds) between incremental steps to turn on traffic on the new endpoint fleet.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnEndpoint.TrafficRoutingConfigProperty>
- Returns:
- a new instance of
CfnEndpoint.TrafficRoutingConfigProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-