Class ProductionVariant.Builder
java.lang.Object
software.amazon.awscdk.services.stepfunctions.tasks.ProductionVariant.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ProductionVariant>
- Enclosing interface:
ProductionVariant
@Stability(Stable)
public static final class ProductionVariant.Builder
extends Object
implements software.amazon.jsii.Builder<ProductionVariant>
A builder for
ProductionVariant-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceleratorType(AcceleratorType acceleratorType) Sets the value ofProductionVariant.getAcceleratorType()build()Builds the configured instance.initialInstanceCount(Number initialInstanceCount) Sets the value ofProductionVariant.getInitialInstanceCount()initialVariantWeight(Number initialVariantWeight) Sets the value ofProductionVariant.getInitialVariantWeight()instanceType(InstanceType instanceType) Sets the value ofProductionVariant.getInstanceType()Sets the value ofProductionVariant.getModelName()variantName(String variantName) Sets the value ofProductionVariant.getVariantName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceType
Sets the value ofProductionVariant.getInstanceType()- Parameters:
instanceType- The ML compute instance type. This parameter is required.- Returns:
this
-
modelName
Sets the value ofProductionVariant.getModelName()- Parameters:
modelName- The name of the model that you want to host. This parameter is required. This is the name that you specified when creating the model.- Returns:
this
-
variantName
Sets the value ofProductionVariant.getVariantName()- Parameters:
variantName- The name of the production variant. This parameter is required.- Returns:
this
-
acceleratorType
@Stability(Stable) public ProductionVariant.Builder acceleratorType(AcceleratorType acceleratorType) Sets the value ofProductionVariant.getAcceleratorType()- Parameters:
acceleratorType- The size of the Elastic Inference (EI) instance to use for the production variant.- Returns:
this
-
initialInstanceCount
@Stability(Stable) public ProductionVariant.Builder initialInstanceCount(Number initialInstanceCount) Sets the value ofProductionVariant.getInitialInstanceCount()- Parameters:
initialInstanceCount- Number of instances to launch initially.- Returns:
this
-
initialVariantWeight
@Stability(Stable) public ProductionVariant.Builder initialVariantWeight(Number initialVariantWeight) Sets the value ofProductionVariant.getInitialVariantWeight()- Parameters:
initialVariantWeight- Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ProductionVariant>- Returns:
- a new instance of
ProductionVariant - Throws:
NullPointerException- if any required attribute was not provided
-