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 Details

    • Builder

      public Builder()
  • Method Details

    • allowAllOutbound

      @Stability(Experimental) public ModelProps.Builder allowAllOutbound(Boolean allowAllOutbound)
      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 of ModelProps.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

      @Stability(Experimental) public ModelProps.Builder modelName(String modelName)
      Sets the value of ModelProps.getModelName()
      Parameters:
      modelName - Name of the SageMaker Model.
      Returns:
      this
    • networkIsolation

      @Stability(Experimental) public ModelProps.Builder networkIsolation(Boolean networkIsolation)
      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

      @Stability(Experimental) public ModelProps.Builder role(IRole role)
      Sets the value of ModelProps.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)
      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

      @Stability(Experimental) public ModelProps.Builder vpc(IVpc vpc)
      Sets the value of ModelProps.getVpc()
      Parameters:
      vpc - The VPC to deploy model containers to.
      Returns:
      this
    • vpcSubnets

      @Stability(Experimental) public ModelProps.Builder vpcSubnets(SubnetSelection vpcSubnets)
      Sets the value of ModelProps.getVpcSubnets()
      Parameters:
      vpcSubnets - The VPC subnets to use when deploying model containers.
      Returns:
      this
    • build

      @Stability(Experimental) public ModelProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<ModelProps>
      Returns:
      a new instance of ModelProps
      Throws:
      NullPointerException - if any required attribute was not provided