Class ModelProps.Builder
java.lang.Object
software.amazon.awscdk.services.sagemaker.alpha.ModelProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ModelProps>
- Enclosing interface:
ModelProps
@Stability(Experimental)
public static final class ModelProps.Builder
extends Object
implements software.amazon.jsii.Builder<ModelProps>
A builder for
ModelProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowAllOutbound
(Boolean allowAllOutbound) Sets the value ofModelProps.getAllowAllOutbound()
build()
Builds the configured instance.containers
(List<? extends ContainerDefinition> containers) Sets the value ofModelProps.getContainers()
Sets the value ofModelProps.getModelName()
networkIsolation
(Boolean networkIsolation) Sets the value ofModelProps.getNetworkIsolation()
Sets the value ofModelProps.getRole()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofModelProps.getSecurityGroups()
Sets the value ofModelProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofModelProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowAllOutbound
Sets the value ofModelProps.getAllowAllOutbound()
- Parameters:
allowAllOutbound
- Whether to allow the SageMaker Model to send all network traffic. If set to false, you must individually add traffic rules to allow the SageMaker Model to connect to network targets.Only used if 'vpc' is supplied.
- Returns:
this
-
containers
@Stability(Experimental) public ModelProps.Builder containers(List<? extends ContainerDefinition> containers) Sets the value ofModelProps.getContainers()
- Parameters:
containers
- Specifies the container definitions for this model, consisting of either a single primary container or an inference pipeline of multiple containers.- Returns:
this
-
modelName
Sets the value ofModelProps.getModelName()
- Parameters:
modelName
- Name of the SageMaker Model.- Returns:
this
-
networkIsolation
Sets the value ofModelProps.getNetworkIsolation()
- Parameters:
networkIsolation
- Whether to enable network isolation for the model container. When enabled, no inbound or outbound network calls can be made to or from the model container.- Returns:
this
-
role
Sets the value ofModelProps.getRole()
- Parameters:
role
- The IAM role that the Amazon SageMaker service assumes.- Returns:
this
-
securityGroups
@Stability(Experimental) public ModelProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofModelProps.getSecurityGroups()
- Parameters:
securityGroups
- The security groups to associate to the Model. If no security groups are provided and 'vpc' is configured, one security group will be created automatically.- Returns:
this
-
vpc
Sets the value ofModelProps.getVpc()
- Parameters:
vpc
- The VPC to deploy model containers to.- Returns:
this
-
vpcSubnets
Sets the value ofModelProps.getVpcSubnets()
- Parameters:
vpcSubnets
- The VPC subnets to use when deploying model containers.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ModelProps>
- Returns:
- a new instance of
ModelProps
- Throws:
NullPointerException
- if any required attribute was not provided
-