Class CfnEndpointConfig.ProductionVariantProperty.Builder
java.lang.Object
software.amazon.awscdk.services.sagemaker.CfnEndpointConfig.ProductionVariantProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEndpointConfig.ProductionVariantProperty>
- Enclosing interface:
CfnEndpointConfig.ProductionVariantProperty
@Stability(Stable)
public static final class CfnEndpointConfig.ProductionVariantProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnEndpointConfig.ProductionVariantProperty>
A builder for
CfnEndpointConfig.ProductionVariantProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceleratorType(String acceleratorType) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getAcceleratorType()build()Builds the configured instance.capacityReservationConfig(IResolvable capacityReservationConfig) capacityReservationConfig(CfnEndpointConfig.CapacityReservationConfigProperty capacityReservationConfig) containerStartupHealthCheckTimeoutInSeconds(Number containerStartupHealthCheckTimeoutInSeconds) coreDumpConfig(IResolvable coreDumpConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getCoreDumpConfig()coreDumpConfig(CfnEndpointConfig.CoreDumpConfigProperty coreDumpConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getCoreDumpConfig()enableSsmAccess(Boolean enableSsmAccess) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getEnableSsmAccess()enableSsmAccess(IResolvable enableSsmAccess) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getEnableSsmAccess()inferenceAmiVersion(String inferenceAmiVersion) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInferenceAmiVersion()initialInstanceCount(Number initialInstanceCount) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInitialInstanceCount()initialVariantWeight(Number initialVariantWeight) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInitialVariantWeight()instancePools(List<? extends Object> instancePools) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInstancePools()instancePools(IResolvable instancePools) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInstancePools()instanceType(String instanceType) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInstanceType()managedInstanceScaling(IResolvable managedInstanceScaling) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getManagedInstanceScaling()managedInstanceScaling(CfnEndpointConfig.ManagedInstanceScalingProperty managedInstanceScaling) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getManagedInstanceScaling()modelDataDownloadTimeoutInSeconds(Number modelDataDownloadTimeoutInSeconds) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getModelName()routingConfig(IResolvable routingConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getRoutingConfig()routingConfig(CfnEndpointConfig.RoutingConfigProperty routingConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getRoutingConfig()serverlessConfig(IResolvable serverlessConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getServerlessConfig()serverlessConfig(CfnEndpointConfig.ServerlessConfigProperty serverlessConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getServerlessConfig()variantInstanceProvisionTimeoutInSeconds(Number variantInstanceProvisionTimeoutInSeconds) variantName(String variantName) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getVariantName()volumeSizeInGb(Number volumeSizeInGb) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getVolumeSizeInGb()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
variantName
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder variantName(String variantName) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getVariantName()- Parameters:
variantName- The name of the production variant. This parameter is required.- Returns:
this
-
acceleratorType
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder acceleratorType(String acceleratorType) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getAcceleratorType()- Parameters:
acceleratorType- The size of the Elastic Inference (EI) instance to use for the production variant. EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker . For more information, see Using Elastic Inference in Amazon SageMaker .- Returns:
this
-
capacityReservationConfig
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder capacityReservationConfig(IResolvable capacityReservationConfig) - Parameters:
capacityReservationConfig- Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.- Returns:
this
-
capacityReservationConfig
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder capacityReservationConfig(CfnEndpointConfig.CapacityReservationConfigProperty capacityReservationConfig) - Parameters:
capacityReservationConfig- Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.- Returns:
this
-
containerStartupHealthCheckTimeoutInSeconds
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder containerStartupHealthCheckTimeoutInSeconds(Number containerStartupHealthCheckTimeoutInSeconds) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getContainerStartupHealthCheckTimeoutInSeconds()- Parameters:
containerStartupHealthCheckTimeoutInSeconds- The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting. For more information about health check, see How Your Container Should Respond to Health Check (Ping) Requests .- Returns:
this
-
coreDumpConfig
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder coreDumpConfig(IResolvable coreDumpConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getCoreDumpConfig()- Parameters:
coreDumpConfig- Specifies where SageMaker writes core dumps from the model container when the process crashes, and how it encrypts them.- Returns:
this
-
coreDumpConfig
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder coreDumpConfig(CfnEndpointConfig.CoreDumpConfigProperty coreDumpConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getCoreDumpConfig()- Parameters:
coreDumpConfig- Specifies where SageMaker writes core dumps from the model container when the process crashes, and how it encrypts them.- Returns:
this
-
enableSsmAccess
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder enableSsmAccess(Boolean enableSsmAccess) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getEnableSsmAccess()- Parameters:
enableSsmAccess- You can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint. By default, SSM access is disabled for all production variants behind an endpoint. You can turn on or turn off SSM access for a production variant behind an existing endpoint by creating a new endpoint configuration and callingUpdateEndpoint.- Returns:
this
-
enableSsmAccess
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder enableSsmAccess(IResolvable enableSsmAccess) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getEnableSsmAccess()- Parameters:
enableSsmAccess- You can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint. By default, SSM access is disabled for all production variants behind an endpoint. You can turn on or turn off SSM access for a production variant behind an existing endpoint by creating a new endpoint configuration and callingUpdateEndpoint.- Returns:
this
-
inferenceAmiVersion
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder inferenceAmiVersion(String inferenceAmiVersion) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInferenceAmiVersion()- Parameters:
inferenceAmiVersion- Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by AWS with a set of software and driver versions. AWS optimizes these configurations for different machine learning workloads. By selecting an AMI version, you can ensure that your inference environment is compatible with specific software requirements, such as CUDA driver versions, Linux kernel versions, or AWS Neuron driver versions- Returns:
this
-
initialInstanceCount
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder initialInstanceCount(Number initialInstanceCount) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInitialInstanceCount()- Parameters:
initialInstanceCount- Number of instances to launch initially.- Returns:
this
-
initialVariantWeight
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder initialVariantWeight(Number initialVariantWeight) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInitialVariantWeight()- Parameters:
initialVariantWeight- Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. The traffic to a production variant is determined by the ratio of theVariantWeightto the sum of allVariantWeightvalues across all ProductionVariants. If unspecified, it defaults to 1.0.- Returns:
this
-
instancePools
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder instancePools(IResolvable instancePools) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInstancePools()- Parameters:
instancePools- A list of instance pools for the production variant. Each instance pool specifies an instance type and its priority for provisioning. Use instance pools to configure heterogeneous endpoints that deploy models across multiple instance types.- Returns:
this
-
instancePools
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder instancePools(List<? extends Object> instancePools) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInstancePools()- Parameters:
instancePools- A list of instance pools for the production variant. Each instance pool specifies an instance type and its priority for provisioning. Use instance pools to configure heterogeneous endpoints that deploy models across multiple instance types.- Returns:
this
-
instanceType
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder instanceType(String instanceType) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getInstanceType()- Parameters:
instanceType- The ML compute instance type.- Returns:
this
-
managedInstanceScaling
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder managedInstanceScaling(IResolvable managedInstanceScaling) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getManagedInstanceScaling()- Parameters:
managedInstanceScaling- Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic.- Returns:
this
-
managedInstanceScaling
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder managedInstanceScaling(CfnEndpointConfig.ManagedInstanceScalingProperty managedInstanceScaling) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getManagedInstanceScaling()- Parameters:
managedInstanceScaling- Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic.- Returns:
this
-
modelDataDownloadTimeoutInSeconds
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder modelDataDownloadTimeoutInSeconds(Number modelDataDownloadTimeoutInSeconds) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getModelDataDownloadTimeoutInSeconds()- Parameters:
modelDataDownloadTimeoutInSeconds- The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this production variant.- Returns:
this
-
modelName
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder modelName(String modelName) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getModelName()- Parameters:
modelName- The name of the model that you want to host. This is the name that you specified when creating the model.- Returns:
this
-
routingConfig
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder routingConfig(IResolvable routingConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getRoutingConfig()- Parameters:
routingConfig- Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.- Returns:
this
-
routingConfig
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder routingConfig(CfnEndpointConfig.RoutingConfigProperty routingConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getRoutingConfig()- Parameters:
routingConfig- Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.- Returns:
this
-
serverlessConfig
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder serverlessConfig(IResolvable serverlessConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getServerlessConfig()- Parameters:
serverlessConfig- The serverless configuration for an endpoint. Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.- Returns:
this
-
serverlessConfig
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder serverlessConfig(CfnEndpointConfig.ServerlessConfigProperty serverlessConfig) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getServerlessConfig()- Parameters:
serverlessConfig- The serverless configuration for an endpoint. Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.- Returns:
this
-
variantInstanceProvisionTimeoutInSeconds
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder variantInstanceProvisionTimeoutInSeconds(Number variantInstanceProvisionTimeoutInSeconds) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getVariantInstanceProvisionTimeoutInSeconds()- Parameters:
variantInstanceProvisionTimeoutInSeconds- The timeout value, in seconds, for provisioning instances for the production variant. When SageMaker encounters an insufficient capacity error while provisioning instances, it retries with the next instance pool (if configured) or waits until the timeout expires. This timeout applies only to capacity provisioning and does not include the time for model download or container startup.- Returns:
this
-
volumeSizeInGb
@Stability(Stable) public CfnEndpointConfig.ProductionVariantProperty.Builder volumeSizeInGb(Number volumeSizeInGb) Sets the value ofCfnEndpointConfig.ProductionVariantProperty.getVolumeSizeInGb()- Parameters:
volumeSizeInGb- The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant. Currently only Amazon EBS gp2 storage volumes are supported.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnEndpointConfig.ProductionVariantProperty>- Returns:
- a new instance of
CfnEndpointConfig.ProductionVariantProperty - Throws:
NullPointerException- if any required attribute was not provided
-