Interface CfnModelPackage.InferenceSpecificationProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnModelPackage.InferenceSpecificationProperty.Jsii$Proxy
Enclosing class:
CfnModelPackage

@Stability(Stable) public static interface CfnModelPackage.InferenceSpecificationProperty extends software.amazon.jsii.JsiiSerializable
Defines how to perform inference generation after a training job is run.

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 modelInput;
 InferenceSpecificationProperty inferenceSpecificationProperty = InferenceSpecificationProperty.builder()
         .containers(List.of(ModelPackageContainerDefinitionProperty.builder()
                 .image("image")
                 // the properties below are optional
                 .containerHostname("containerHostname")
                 .environment(Map.of(
                         "environmentKey", "environment"))
                 .framework("framework")
                 .frameworkVersion("frameworkVersion")
                 .imageDigest("imageDigest")
                 .modelDataUrl("modelDataUrl")
                 .modelInput(modelInput)
                 .nearestModelName("nearestModelName")
                 .productId("productId")
                 .build()))
         .supportedContentTypes(List.of("supportedContentTypes"))
         .supportedResponseMimeTypes(List.of("supportedResponseMimeTypes"))
         // the properties below are optional
         .supportedRealtimeInferenceInstanceTypes(List.of("supportedRealtimeInferenceInstanceTypes"))
         .supportedTransformInstanceTypes(List.of("supportedTransformInstanceTypes"))
         .build();
 
  • Method Details

    • getContainers

      @Stability(Stable) @NotNull Object getContainers()
      The Amazon ECR registry path of the Docker image that contains the inference code.
    • getSupportedContentTypes

      @Stability(Stable) @NotNull List<String> getSupportedContentTypes()
      The supported MIME types for the input data.
    • getSupportedResponseMimeTypes

      @Stability(Stable) @NotNull List<String> getSupportedResponseMimeTypes()
      The supported MIME types for the output data.
    • getSupportedRealtimeInferenceInstanceTypes

      @Stability(Stable) @Nullable default List<String> getSupportedRealtimeInferenceInstanceTypes()
      A list of the instance types that are used to generate inferences in real-time.

      This parameter is required for unversioned models, and optional for versioned models.

    • getSupportedTransformInstanceTypes

      @Stability(Stable) @Nullable default List<String> getSupportedTransformInstanceTypes()
      A list of the instance types on which a transformation job can be run or on which an endpoint can be deployed.

      This parameter is required for unversioned models, and optional for versioned models.

    • builder

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