Class CfnModelPackagePropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.sagemaker.CfnModelPackagePropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:20:05.055Z") @Stability(Stable) public class CfnModelPackagePropsMixin extends Mixin implements software.constructs.IMixin
A container for your trained model that can be deployed for SageMaker inference.

This can include inference code, artifacts, and metadata. The model package type can be one of the following.

  • Versioned model: A part of a model package group in Model Registry.
  • Unversioned model: Not part of a model package group and used in AWS Marketplace.

For more information, see CreateModelPackage .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.sagemaker.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 Object modelInput;
 CfnModelPackagePropsMixin cfnModelPackagePropsMixin = CfnModelPackagePropsMixin.Builder.create(CfnModelPackageMixinProps.builder()
         .additionalInferenceSpecifications(List.of(AdditionalInferenceSpecificationDefinitionProperty.builder()
                 .containers(List.of(ModelPackageContainerDefinitionProperty.builder()
                         .containerHostname("containerHostname")
                         .environment(Map.of(
                                 "environmentKey", "environment"))
                         .framework("framework")
                         .frameworkVersion("frameworkVersion")
                         .image("image")
                         .imageDigest("imageDigest")
                         .modelDataSource(ModelDataSourceProperty.builder()
                                 .s3DataSource(S3ModelDataSourceProperty.builder()
                                         .compressionType("compressionType")
                                         .modelAccessConfig(ModelAccessConfigProperty.builder()
                                                 .acceptEula(false)
                                                 .build())
                                         .s3DataType("s3DataType")
                                         .s3Uri("s3Uri")
                                         .build())
                                 .build())
                         .modelDataUrl("modelDataUrl")
                         .modelInput(modelInput)
                         .nearestModelName("nearestModelName")
                         .build()))
                 .description("description")
                 .name("name")
                 .supportedContentTypes(List.of("supportedContentTypes"))
                 .supportedRealtimeInferenceInstanceTypes(List.of("supportedRealtimeInferenceInstanceTypes"))
                 .supportedResponseMimeTypes(List.of("supportedResponseMimeTypes"))
                 .supportedTransformInstanceTypes(List.of("supportedTransformInstanceTypes"))
                 .build()))
         .additionalInferenceSpecificationsToAdd(List.of(AdditionalInferenceSpecificationDefinitionProperty.builder()
                 .containers(List.of(ModelPackageContainerDefinitionProperty.builder()
                         .containerHostname("containerHostname")
                         .environment(Map.of(
                                 "environmentKey", "environment"))
                         .framework("framework")
                         .frameworkVersion("frameworkVersion")
                         .image("image")
                         .imageDigest("imageDigest")
                         .modelDataSource(ModelDataSourceProperty.builder()
                                 .s3DataSource(S3ModelDataSourceProperty.builder()
                                         .compressionType("compressionType")
                                         .modelAccessConfig(ModelAccessConfigProperty.builder()
                                                 .acceptEula(false)
                                                 .build())
                                         .s3DataType("s3DataType")
                                         .s3Uri("s3Uri")
                                         .build())
                                 .build())
                         .modelDataUrl("modelDataUrl")
                         .modelInput(modelInput)
                         .nearestModelName("nearestModelName")
                         .build()))
                 .description("description")
                 .name("name")
                 .supportedContentTypes(List.of("supportedContentTypes"))
                 .supportedRealtimeInferenceInstanceTypes(List.of("supportedRealtimeInferenceInstanceTypes"))
                 .supportedResponseMimeTypes(List.of("supportedResponseMimeTypes"))
                 .supportedTransformInstanceTypes(List.of("supportedTransformInstanceTypes"))
                 .build()))
         .approvalDescription("approvalDescription")
         .certifyForMarketplace(false)
         .clientToken("clientToken")
         .customerMetadataProperties(Map.of(
                 "customerMetadataPropertiesKey", "customerMetadataProperties"))
         .domain("domain")
         .driftCheckBaselines(DriftCheckBaselinesProperty.builder()
                 .bias(DriftCheckBiasProperty.builder()
                         .configFile(FileSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .postTrainingConstraints(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .preTrainingConstraints(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 .explainability(DriftCheckExplainabilityProperty.builder()
                         .configFile(FileSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .constraints(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 .modelDataQuality(DriftCheckModelDataQualityProperty.builder()
                         .constraints(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .statistics(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 .modelQuality(DriftCheckModelQualityProperty.builder()
                         .constraints(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .statistics(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 .build())
         .inferenceSpecification(InferenceSpecificationProperty.builder()
                 .containers(List.of(ModelPackageContainerDefinitionProperty.builder()
                         .containerHostname("containerHostname")
                         .environment(Map.of(
                                 "environmentKey", "environment"))
                         .framework("framework")
                         .frameworkVersion("frameworkVersion")
                         .image("image")
                         .imageDigest("imageDigest")
                         .modelDataSource(ModelDataSourceProperty.builder()
                                 .s3DataSource(S3ModelDataSourceProperty.builder()
                                         .compressionType("compressionType")
                                         .modelAccessConfig(ModelAccessConfigProperty.builder()
                                                 .acceptEula(false)
                                                 .build())
                                         .s3DataType("s3DataType")
                                         .s3Uri("s3Uri")
                                         .build())
                                 .build())
                         .modelDataUrl("modelDataUrl")
                         .modelInput(modelInput)
                         .nearestModelName("nearestModelName")
                         .build()))
                 .supportedContentTypes(List.of("supportedContentTypes"))
                 .supportedRealtimeInferenceInstanceTypes(List.of("supportedRealtimeInferenceInstanceTypes"))
                 .supportedResponseMimeTypes(List.of("supportedResponseMimeTypes"))
                 .supportedTransformInstanceTypes(List.of("supportedTransformInstanceTypes"))
                 .build())
         .lastModifiedTime("lastModifiedTime")
         .metadataProperties(MetadataPropertiesProperty.builder()
                 .commitId("commitId")
                 .generatedBy("generatedBy")
                 .projectId("projectId")
                 .repository("repository")
                 .build())
         .modelApprovalStatus("modelApprovalStatus")
         .modelCard(ModelCardProperty.builder()
                 .modelCardContent("modelCardContent")
                 .modelCardStatus("modelCardStatus")
                 .build())
         .modelMetrics(ModelMetricsProperty.builder()
                 .bias(BiasProperty.builder()
                         .postTrainingReport(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .preTrainingReport(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .report(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 .explainability(ExplainabilityProperty.builder()
                         .report(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 .modelDataQuality(ModelDataQualityProperty.builder()
                         .constraints(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .statistics(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 .modelQuality(ModelQualityProperty.builder()
                         .constraints(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .statistics(MetricsSourceProperty.builder()
                                 .contentDigest("contentDigest")
                                 .contentType("contentType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 .build())
         .modelPackageDescription("modelPackageDescription")
         .modelPackageGroupName("modelPackageGroupName")
         .modelPackageName("modelPackageName")
         .modelPackageStatusDetails(ModelPackageStatusDetailsProperty.builder()
                 .validationStatuses(List.of(ModelPackageStatusItemProperty.builder()
                         .failureReason("failureReason")
                         .name("name")
                         .status("status")
                         .build()))
                 .build())
         .modelPackageVersion(123)
         .samplePayloadUrl("samplePayloadUrl")
         .securityConfig(SecurityConfigProperty.builder()
                 .kmsKeyId("kmsKeyId")
                 .build())
         .skipModelValidation("skipModelValidation")
         .sourceAlgorithmSpecification(SourceAlgorithmSpecificationProperty.builder()
                 .sourceAlgorithms(List.of(SourceAlgorithmProperty.builder()
                         .algorithmName("algorithmName")
                         .modelDataUrl("modelDataUrl")
                         .build()))
                 .build())
         .sourceUri("sourceUri")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .task("task")
         .validationSpecification(ValidationSpecificationProperty.builder()
                 .validationProfiles(List.of(ValidationProfileProperty.builder()
                         .profileName("profileName")
                         .transformJobDefinition(TransformJobDefinitionProperty.builder()
                                 .batchStrategy("batchStrategy")
                                 .environment(Map.of(
                                         "environmentKey", "environment"))
                                 .maxConcurrentTransforms(123)
                                 .maxPayloadInMb(123)
                                 .transformInput(TransformInputProperty.builder()
                                         .compressionType("compressionType")
                                         .contentType("contentType")
                                         .dataSource(DataSourceProperty.builder()
                                                 .s3DataSource(S3DataSourceProperty.builder()
                                                         .s3DataType("s3DataType")
                                                         .s3Uri("s3Uri")
                                                         .build())
                                                 .build())
                                         .splitType("splitType")
                                         .build())
                                 .transformOutput(TransformOutputProperty.builder()
                                         .accept("accept")
                                         .assembleWith("assembleWith")
                                         .kmsKeyId("kmsKeyId")
                                         .s3OutputPath("s3OutputPath")
                                         .build())
                                 .transformResources(TransformResourcesProperty.builder()
                                         .instanceCount(123)
                                         .instanceType("instanceType")
                                         .volumeKmsKeyId("volumeKmsKeyId")
                                         .build())
                                 .build())
                         .build()))
                 .validationRole("validationRole")
                 .build())
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnModelPackagePropsMixin

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

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

      @Stability(Stable) public CfnModelPackagePropsMixin(@NotNull CfnModelPackageMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::SageMaker::ModelPackage.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnModelPackagePropsMixin

      @Stability(Stable) public CfnModelPackagePropsMixin(@NotNull CfnModelPackageMixinProps props)
      Create a mixin to apply properties to AWS::SageMaker::ModelPackage.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnModelPackageMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()