Interface CfnModelProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnModelProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:35.437Z") @Stability(Stable) public interface CfnModelProps extends software.amazon.jsii.JsiiSerializable
Properties for defining a CfnModel.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.sagemaker.*;
 Object environment;
 CfnModelProps cfnModelProps = CfnModelProps.builder()
         .executionRoleArn("executionRoleArn")
         // the properties below are optional
         .containers(List.of(ContainerDefinitionProperty.builder()
                 .containerHostname("containerHostname")
                 .environment(environment)
                 .image("image")
                 .imageConfig(ImageConfigProperty.builder()
                         .repositoryAccessMode("repositoryAccessMode")
                         // the properties below are optional
                         .repositoryAuthConfig(RepositoryAuthConfigProperty.builder()
                                 .repositoryCredentialsProviderArn("repositoryCredentialsProviderArn")
                                 .build())
                         .build())
                 .inferenceSpecificationName("inferenceSpecificationName")
                 .mode("mode")
                 .modelDataUrl("modelDataUrl")
                 .modelPackageName("modelPackageName")
                 .multiModelConfig(MultiModelConfigProperty.builder()
                         .modelCacheSetting("modelCacheSetting")
                         .build())
                 .build()))
         .enableNetworkIsolation(false)
         .inferenceExecutionConfig(InferenceExecutionConfigProperty.builder()
                 .mode("mode")
                 .build())
         .modelName("modelName")
         .primaryContainer(ContainerDefinitionProperty.builder()
                 .containerHostname("containerHostname")
                 .environment(environment)
                 .image("image")
                 .imageConfig(ImageConfigProperty.builder()
                         .repositoryAccessMode("repositoryAccessMode")
                         // the properties below are optional
                         .repositoryAuthConfig(RepositoryAuthConfigProperty.builder()
                                 .repositoryCredentialsProviderArn("repositoryCredentialsProviderArn")
                                 .build())
                         .build())
                 .inferenceSpecificationName("inferenceSpecificationName")
                 .mode("mode")
                 .modelDataUrl("modelDataUrl")
                 .modelPackageName("modelPackageName")
                 .multiModelConfig(MultiModelConfigProperty.builder()
                         .modelCacheSetting("modelCacheSetting")
                         .build())
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .vpcConfig(VpcConfigProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnets(List.of("subnets"))
                 .build())
         .build();
 
  • Method Details

    • getExecutionRoleArn

      @Stability(Stable) @NotNull String getExecutionRoleArn()
      The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs.

      Deploying on ML compute instances is part of model hosting. For more information, see SageMaker Roles .

      To be able to pass this role to SageMaker, the caller of this API must have the iam:PassRole permission.

    • getContainers

      @Stability(Stable) @Nullable default Object getContainers()
      Specifies the containers in the inference pipeline.
    • getEnableNetworkIsolation

      @Stability(Stable) @Nullable default Object getEnableNetworkIsolation()
      Isolates the model container.

      No inbound or outbound network calls can be made to or from the model container.

    • getInferenceExecutionConfig

      @Stability(Stable) @Nullable default Object getInferenceExecutionConfig()
      Specifies details of how containers in a multi-container endpoint are called.
    • getModelName

      @Stability(Stable) @Nullable default String getModelName()
      The name of the new model.
    • getPrimaryContainer

      @Stability(Stable) @Nullable default Object getPrimaryContainer()
      The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.
    • getTags

      @Stability(Stable) @Nullable default List<CfnTag> getTags()
      A list of key-value pairs to apply to this resource.

      For more information, see Resource Tag and Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

    • getVpcConfig

      @Stability(Stable) @Nullable default Object getVpcConfig()
      A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud .
    • builder

      @Stability(Stable) static CfnModelProps.Builder builder()
      Returns:
      a CfnModelProps.Builder of CfnModelProps