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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA structure of additional Inference Specification.static interfaceContains bias metrics for a model.static final classA fluent builder forCfnModelPackagePropsMixin.static interfaceDescribes the location of the channel data.static interfaceRepresents the drift check baselines that can be used when the model monitor is set using the model package.static interfaceRepresents the drift check bias baselines that can be used when the model monitor is set using the model package.static interfaceRepresents the drift check explainability baselines that can be used when the model monitor is set using the model package.static interfaceRepresents the drift check data quality baselines that can be used when the model monitor is set using the model package.static interfaceRepresents the drift check model quality baselines that can be used when the model monitor is set using the model package.static interfaceContains explainability metrics for a model.static interfaceContains details regarding the file source.static interfaceDefines how to perform inference generation after a training job is run.static interfaceMetadata properties of the tracking entity, trial, or trial component.static interfaceDetails about the metrics source.static interfaceThe access configuration file to control access to the ML model.static interfaceAn Amazon SageMaker Model Card.static interfaceData quality constraints and statistics for a model.static interfaceSpecifies the location of ML model data to deploy.static interfaceContains metrics captured from a model.static interfaceDescribes the Docker container for the model package.static interfaceSpecifies the validation and image scan statuses of the model package.static interfaceRepresents the overall status of a model package.static interfaceModel quality statistics and constraints.static interfaceDescribes the S3 data source.static interfaceSpecifies the S3 location of ML model data to deploy.static interfaceAn optional AWS Key Management Service key to encrypt, decrypt, and re-encrypt model package information for regulated workloads with highly sensitive data.static interfaceSpecifies an algorithm that was used to create the model package.static interfaceA list of algorithms that were used to create a model package.static interfaceDescribes the input source of a transform job and the way the transform job consumes it.static interfaceDefines the input needed to run a transform job using the inference specification specified in the algorithm.static interfaceDescribes the results of a transform job.static interfaceDescribes the resources, including ML instance types and ML instance count, to use for transform job.static interfaceContains data, such as the inputs and targeted instance types that are used in the process of validating the model package.static interfaceSpecifies batch transform jobs that SageMaker runs to validate your model package.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::SageMaker::ModelPackage.Create a mixin to apply properties toAWS::SageMaker::ModelPackage.protectedCfnModelPackagePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnModelPackagePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnModelPackageMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 toAWS::SageMaker::ModelPackage.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnModelPackagePropsMixin
Create a mixin to apply properties toAWS::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. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-