java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.sagemaker.alpha.Model
All Implemented Interfaces:
IResource, IConnectable, IGrantable, IModel, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.102.0 (build e354887)", date="2024-08-29T22:54:28.054Z") @Stability(Experimental) public class Model extends Resource implements IModel
(experimental) Defines a SageMaker Model.

Example:

 import software.amazon.awscdk.services.sagemaker.alpha.*;
 ContainerImage image;
 ModelData modelData;
 Model model = Model.Builder.create(this, "ContainerModel")
         .containers(List.of(ContainerDefinition.builder()
                 .image(image)
                 .modelData(modelData)
                 .build()))
         .networkIsolation(true)
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    (experimental) A fluent builder for Model.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.sagemaker.alpha.IModel

    IModel.Jsii$Default, IModel.Jsii$Proxy

    Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource

    IResource.Jsii$Default
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Model(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Model(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    Model(software.constructs.Construct scope, String id)
     
     
    Model(software.constructs.Construct scope, String id, ModelProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    (experimental) Add containers to the model.
    void
    (experimental) Adds a statement to the IAM role assumed by the instance.
    static IModel
    fromModelArn(software.constructs.Construct scope, String id, String modelArn)
    (experimental) Imports a Model defined either outside the CDK or in a different CDK stack.
    static IModel
    fromModelAttributes(software.constructs.Construct scope, String id, ModelAttributes attrs)
    (experimental) Imports a Model defined either outside the CDK or in a different CDK stack.
    static IModel
    fromModelName(software.constructs.Construct scope, String id, String modelName)
    (experimental) Imports a Model defined either outside the CDK or in a different CDK stack.
    (experimental) An accessor for the Connections object that will fail if this Model does not have a VPC configured.
    (experimental) The principal this Model is running as.
    (experimental) Returns the ARN of this model.
    (experimental) Returns the name of the model.
    (experimental) Execution role for SageMaker Model.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.constructs.IConstruct

    getNode

    Methods inherited from interface software.amazon.awscdk.IResource

    applyRemovalPolicy, getEnv, getStack

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Model

      protected Model(software.amazon.jsii.JsiiObjectRef objRef)
    • Model

      protected Model(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Model

      @Stability(Experimental) public Model(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ModelProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • Model

      @Stability(Experimental) public Model(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromModelArn

      @Stability(Experimental) @NotNull public static IModel fromModelArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String modelArn)
      (experimental) Imports a Model defined either outside the CDK or in a different CDK stack.

      Parameters:
      scope - the Construct scope. This parameter is required.
      id - the resource id. This parameter is required.
      modelArn - the ARN of the model. This parameter is required.
    • fromModelAttributes

      @Stability(Experimental) @NotNull public static IModel fromModelAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ModelAttributes attrs)
      (experimental) Imports a Model defined either outside the CDK or in a different CDK stack.

      Parameters:
      scope - the Construct scope. This parameter is required.
      id - the resource id. This parameter is required.
      attrs - the attributes of the model to import. This parameter is required.
    • fromModelName

      @Stability(Experimental) @NotNull public static IModel fromModelName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String modelName)
      (experimental) Imports a Model defined either outside the CDK or in a different CDK stack.

      Parameters:
      scope - the Construct scope. This parameter is required.
      id - the resource id. This parameter is required.
      modelName - the name of the model. This parameter is required.
    • addContainer

      @Stability(Experimental) public void addContainer(@NotNull ContainerDefinition container)
      (experimental) Add containers to the model.

      Parameters:
      container - The container definition to add. This parameter is required.
    • addToRolePolicy

      @Stability(Experimental) public void addToRolePolicy(@NotNull PolicyStatement statement)
      (experimental) Adds a statement to the IAM role assumed by the instance.

      Specified by:
      addToRolePolicy in interface IModel
      Parameters:
      statement - This parameter is required.
    • getConnections

      @Stability(Experimental) @NotNull public Connections getConnections()
      (experimental) An accessor for the Connections object that will fail if this Model does not have a VPC configured.
      Specified by:
      getConnections in interface IConnectable
    • getGrantPrincipal

      @Stability(Experimental) @NotNull public IPrincipal getGrantPrincipal()
      (experimental) The principal this Model is running as.
      Specified by:
      getGrantPrincipal in interface IGrantable
    • getModelArn

      @Stability(Experimental) @NotNull public String getModelArn()
      (experimental) Returns the ARN of this model.
      Specified by:
      getModelArn in interface IModel
    • getModelName

      @Stability(Experimental) @NotNull public String getModelName()
      (experimental) Returns the name of the model.
      Specified by:
      getModelName in interface IModel
    • getRole

      @Stability(Experimental) @Nullable public IRole getRole()
      (experimental) Execution role for SageMaker Model.
      Specified by:
      getRole in interface IModel