Skip to content
v2.274.0

CfnModelPackage L1 construct ​

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 ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';

declare const modelInput: any;
const cfnModelPackage = new sagemaker.CfnModelPackage(this, 'MyCfnModelPackage', /* all optional props */ {
  additionalInferenceSpecifications: [{
    containers: [{
      image: 'image',

      // the properties below are optional
      containerHostname: 'containerHostname',
      environment: {
        environmentKey: 'environment',
      },
      framework: 'framework',
      frameworkVersion: 'frameworkVersion',
      imageDigest: 'imageDigest',
      modelDataSource: {
        s3DataSource: {
          compressionType: 'compressionType',
          s3DataType: 's3DataType',
          s3Uri: 's3Uri',

          // the properties below are optional
          modelAccessConfig: {
            acceptEula: false,
          },
        },
      },
      modelDataUrl: 'modelDataUrl',
      modelInput: modelInput,
      nearestModelName: 'nearestModelName',
    }],
    name: 'name',

    // the properties below are optional
    description: 'description',
    supportedContentTypes: ['supportedContentTypes'],
    supportedRealtimeInferenceInstanceTypes: ['supportedRealtimeInferenceInstanceTypes'],
    supportedResponseMimeTypes: ['supportedResponseMimeTypes'],
    supportedTransformInstanceTypes: ['supportedTransformInstanceTypes'],
  }],
  additionalInferenceSpecificationsToAdd: [{
    containers: [{
      image: 'image',

      // the properties below are optional
      containerHostname: 'containerHostname',
      environment: {
        environmentKey: 'environment',
      },
      framework: 'framework',
      frameworkVersion: 'frameworkVersion',
      imageDigest: 'imageDigest',
      modelDataSource: {
        s3DataSource: {
          compressionType: 'compressionType',
          s3DataType: 's3DataType',
          s3Uri: 's3Uri',

          // the properties below are optional
          modelAccessConfig: {
            acceptEula: false,
          },
        },
      },
      modelDataUrl: 'modelDataUrl',
      modelInput: modelInput,
      nearestModelName: 'nearestModelName',
    }],
    name: 'name',

    // the properties below are optional
    description: 'description',
    supportedContentTypes: ['supportedContentTypes'],
    supportedRealtimeInferenceInstanceTypes: ['supportedRealtimeInferenceInstanceTypes'],
    supportedResponseMimeTypes: ['supportedResponseMimeTypes'],
    supportedTransformInstanceTypes: ['supportedTransformInstanceTypes'],
  }],
  approvalDescription: 'approvalDescription',
  certifyForMarketplace: false,
  clientToken: 'clientToken',
  customerMetadataProperties: {
    customerMetadataPropertiesKey: 'customerMetadataProperties',
  },
  domain: 'domain',
  driftCheckBaselines: {
    bias: {
      configFile: {
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
        contentType: 'contentType',
      },
      postTrainingConstraints: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
      preTrainingConstraints: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
    },
    explainability: {
      configFile: {
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
        contentType: 'contentType',
      },
      constraints: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
    },
    modelDataQuality: {
      constraints: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
      statistics: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
    },
    modelQuality: {
      constraints: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
      statistics: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
    },
  },
  inferenceSpecification: {
    containers: [{
      image: 'image',

      // the properties below are optional
      containerHostname: 'containerHostname',
      environment: {
        environmentKey: 'environment',
      },
      framework: 'framework',
      frameworkVersion: 'frameworkVersion',
      imageDigest: 'imageDigest',
      modelDataSource: {
        s3DataSource: {
          compressionType: 'compressionType',
          s3DataType: 's3DataType',
          s3Uri: 's3Uri',

          // the properties below are optional
          modelAccessConfig: {
            acceptEula: false,
          },
        },
      },
      modelDataUrl: 'modelDataUrl',
      modelInput: modelInput,
      nearestModelName: 'nearestModelName',
    }],
    supportedContentTypes: ['supportedContentTypes'],
    supportedResponseMimeTypes: ['supportedResponseMimeTypes'],

    // the properties below are optional
    supportedRealtimeInferenceInstanceTypes: ['supportedRealtimeInferenceInstanceTypes'],
    supportedTransformInstanceTypes: ['supportedTransformInstanceTypes'],
  },
  lastModifiedTime: 'lastModifiedTime',
  metadataProperties: {
    commitId: 'commitId',
    generatedBy: 'generatedBy',
    projectId: 'projectId',
    repository: 'repository',
  },
  modelApprovalStatus: 'modelApprovalStatus',
  modelCard: {
    modelCardContent: 'modelCardContent',
    modelCardStatus: 'modelCardStatus',
  },
  modelMetrics: {
    bias: {
      postTrainingReport: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
      preTrainingReport: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
      report: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
    },
    explainability: {
      report: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
    },
    modelDataQuality: {
      constraints: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
      statistics: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
    },
    modelQuality: {
      constraints: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
      statistics: {
        contentType: 'contentType',
        s3Uri: 's3Uri',

        // the properties below are optional
        contentDigest: 'contentDigest',
      },
    },
  },
  modelPackageDescription: 'modelPackageDescription',
  modelPackageGroupName: 'modelPackageGroupName',
  modelPackageName: 'modelPackageName',
  modelPackageStatusDetails: {
    validationStatuses: [{
      name: 'name',
      status: 'status',

      // the properties below are optional
      failureReason: 'failureReason',
    }],
  },
  modelPackageVersion: 123,
  samplePayloadUrl: 'samplePayloadUrl',
  securityConfig: {
    kmsKeyId: 'kmsKeyId',
  },
  skipModelValidation: 'skipModelValidation',
  sourceAlgorithmSpecification: {
    sourceAlgorithms: [{
      algorithmName: 'algorithmName',

      // the properties below are optional
      modelDataUrl: 'modelDataUrl',
    }],
  },
  sourceUri: 'sourceUri',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  task: 'task',
  validationSpecification: {
    validationProfiles: [{
      profileName: 'profileName',
      transformJobDefinition: {
        transformInput: {
          dataSource: {
            s3DataSource: {
              s3DataType: 's3DataType',
              s3Uri: 's3Uri',
            },
          },

          // the properties below are optional
          compressionType: 'compressionType',
          contentType: 'contentType',
          splitType: 'splitType',
        },
        transformOutput: {
          s3OutputPath: 's3OutputPath',

          // the properties below are optional
          accept: 'accept',
          assembleWith: 'assembleWith',
          kmsKeyId: 'kmsKeyId',
        },
        transformResources: {
          instanceCount: 123,
          instanceType: 'instanceType',

          // the properties below are optional
          volumeKmsKeyId: 'volumeKmsKeyId',
        },

        // the properties below are optional
        batchStrategy: 'batchStrategy',
        environment: {
          environmentKey: 'environment',
        },
        maxConcurrentTransforms: 123,
        maxPayloadInMb: 123,
      },
    }],
    validationRole: 'validationRole',
  },
});
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

# model_input: Any

cfn_model_package = sagemaker.CfnModelPackage(self, "MyCfnModelPackage",
    additional_inference_specifications=[sagemaker.CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty(
        containers=[sagemaker.CfnModelPackage.ModelPackageContainerDefinitionProperty(
            image="image",

            # the properties below are optional
            container_hostname="containerHostname",
            environment={
                "environment_key": "environment"
            },
            framework="framework",
            framework_version="frameworkVersion",
            image_digest="imageDigest",
            model_data_source=sagemaker.CfnModelPackage.ModelDataSourceProperty(
                s3_data_source=sagemaker.CfnModelPackage.S3ModelDataSourceProperty(
                    compression_type="compressionType",
                    s3_data_type="s3DataType",
                    s3_uri="s3Uri",

                    # the properties below are optional
                    model_access_config=sagemaker.CfnModelPackage.ModelAccessConfigProperty(
                        accept_eula=False
                    )
                )
            ),
            model_data_url="modelDataUrl",
            model_input=model_input,
            nearest_model_name="nearestModelName"
        )],
        name="name",

        # the properties below are optional
        description="description",
        supported_content_types=["supportedContentTypes"],
        supported_realtime_inference_instance_types=["supportedRealtimeInferenceInstanceTypes"],
        supported_response_mime_types=["supportedResponseMimeTypes"],
        supported_transform_instance_types=["supportedTransformInstanceTypes"]
    )],
    additional_inference_specifications_to_add=[sagemaker.CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty(
        containers=[sagemaker.CfnModelPackage.ModelPackageContainerDefinitionProperty(
            image="image",

            # the properties below are optional
            container_hostname="containerHostname",
            environment={
                "environment_key": "environment"
            },
            framework="framework",
            framework_version="frameworkVersion",
            image_digest="imageDigest",
            model_data_source=sagemaker.CfnModelPackage.ModelDataSourceProperty(
                s3_data_source=sagemaker.CfnModelPackage.S3ModelDataSourceProperty(
                    compression_type="compressionType",
                    s3_data_type="s3DataType",
                    s3_uri="s3Uri",

                    # the properties below are optional
                    model_access_config=sagemaker.CfnModelPackage.ModelAccessConfigProperty(
                        accept_eula=False
                    )
                )
            ),
            model_data_url="modelDataUrl",
            model_input=model_input,
            nearest_model_name="nearestModelName"
        )],
        name="name",

        # the properties below are optional
        description="description",
        supported_content_types=["supportedContentTypes"],
        supported_realtime_inference_instance_types=["supportedRealtimeInferenceInstanceTypes"],
        supported_response_mime_types=["supportedResponseMimeTypes"],
        supported_transform_instance_types=["supportedTransformInstanceTypes"]
    )],
    approval_description="approvalDescription",
    certify_for_marketplace=False,
    client_token="clientToken",
    customer_metadata_properties={
        "customer_metadata_properties_key": "customerMetadataProperties"
    },
    domain="domain",
    drift_check_baselines=sagemaker.CfnModelPackage.DriftCheckBaselinesProperty(
        bias=sagemaker.CfnModelPackage.DriftCheckBiasProperty(
            config_file=sagemaker.CfnModelPackage.FileSourceProperty(
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest",
                content_type="contentType"
            ),
            post_training_constraints=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            ),
            pre_training_constraints=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            )
        ),
        explainability=sagemaker.CfnModelPackage.DriftCheckExplainabilityProperty(
            config_file=sagemaker.CfnModelPackage.FileSourceProperty(
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest",
                content_type="contentType"
            ),
            constraints=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            )
        ),
        model_data_quality=sagemaker.CfnModelPackage.DriftCheckModelDataQualityProperty(
            constraints=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            ),
            statistics=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            )
        ),
        model_quality=sagemaker.CfnModelPackage.DriftCheckModelQualityProperty(
            constraints=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            ),
            statistics=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            )
        )
    ),
    inference_specification=sagemaker.CfnModelPackage.InferenceSpecificationProperty(
        containers=[sagemaker.CfnModelPackage.ModelPackageContainerDefinitionProperty(
            image="image",

            # the properties below are optional
            container_hostname="containerHostname",
            environment={
                "environment_key": "environment"
            },
            framework="framework",
            framework_version="frameworkVersion",
            image_digest="imageDigest",
            model_data_source=sagemaker.CfnModelPackage.ModelDataSourceProperty(
                s3_data_source=sagemaker.CfnModelPackage.S3ModelDataSourceProperty(
                    compression_type="compressionType",
                    s3_data_type="s3DataType",
                    s3_uri="s3Uri",

                    # the properties below are optional
                    model_access_config=sagemaker.CfnModelPackage.ModelAccessConfigProperty(
                        accept_eula=False
                    )
                )
            ),
            model_data_url="modelDataUrl",
            model_input=model_input,
            nearest_model_name="nearestModelName"
        )],
        supported_content_types=["supportedContentTypes"],
        supported_response_mime_types=["supportedResponseMimeTypes"],

        # the properties below are optional
        supported_realtime_inference_instance_types=["supportedRealtimeInferenceInstanceTypes"],
        supported_transform_instance_types=["supportedTransformInstanceTypes"]
    ),
    last_modified_time="lastModifiedTime",
    metadata_properties=sagemaker.CfnModelPackage.MetadataPropertiesProperty(
        commit_id="commitId",
        generated_by="generatedBy",
        project_id="projectId",
        repository="repository"
    ),
    model_approval_status="modelApprovalStatus",
    model_card=sagemaker.CfnModelPackage.ModelCardProperty(
        model_card_content="modelCardContent",
        model_card_status="modelCardStatus"
    ),
    model_metrics=sagemaker.CfnModelPackage.ModelMetricsProperty(
        bias=sagemaker.CfnModelPackage.BiasProperty(
            post_training_report=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            ),
            pre_training_report=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            ),
            report=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            )
        ),
        explainability=sagemaker.CfnModelPackage.ExplainabilityProperty(
            report=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            )
        ),
        model_data_quality=sagemaker.CfnModelPackage.ModelDataQualityProperty(
            constraints=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            ),
            statistics=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            )
        ),
        model_quality=sagemaker.CfnModelPackage.ModelQualityProperty(
            constraints=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            ),
            statistics=sagemaker.CfnModelPackage.MetricsSourceProperty(
                content_type="contentType",
                s3_uri="s3Uri",

                # the properties below are optional
                content_digest="contentDigest"
            )
        )
    ),
    model_package_description="modelPackageDescription",
    model_package_group_name="modelPackageGroupName",
    model_package_name="modelPackageName",
    model_package_status_details=sagemaker.CfnModelPackage.ModelPackageStatusDetailsProperty(
        validation_statuses=[sagemaker.CfnModelPackage.ModelPackageStatusItemProperty(
            name="name",
            status="status",

            # the properties below are optional
            failure_reason="failureReason"
        )]
    ),
    model_package_version=123,
    sample_payload_url="samplePayloadUrl",
    security_config=sagemaker.CfnModelPackage.SecurityConfigProperty(
        kms_key_id="kmsKeyId"
    ),
    skip_model_validation="skipModelValidation",
    source_algorithm_specification=sagemaker.CfnModelPackage.SourceAlgorithmSpecificationProperty(
        source_algorithms=[sagemaker.CfnModelPackage.SourceAlgorithmProperty(
            algorithm_name="algorithmName",

            # the properties below are optional
            model_data_url="modelDataUrl"
        )]
    ),
    source_uri="sourceUri",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    task="task",
    validation_specification=sagemaker.CfnModelPackage.ValidationSpecificationProperty(
        validation_profiles=[sagemaker.CfnModelPackage.ValidationProfileProperty(
            profile_name="profileName",
            transform_job_definition=sagemaker.CfnModelPackage.TransformJobDefinitionProperty(
                transform_input=sagemaker.CfnModelPackage.TransformInputProperty(
                    data_source=sagemaker.CfnModelPackage.DataSourceProperty(
                        s3_data_source=sagemaker.CfnModelPackage.S3DataSourceProperty(
                            s3_data_type="s3DataType",
                            s3_uri="s3Uri"
                        )
                    ),

                    # the properties below are optional
                    compression_type="compressionType",
                    content_type="contentType",
                    split_type="splitType"
                ),
                transform_output=sagemaker.CfnModelPackage.TransformOutputProperty(
                    s3_output_path="s3OutputPath",

                    # the properties below are optional
                    accept="accept",
                    assemble_with="assembleWith",
                    kms_key_id="kmsKeyId"
                ),
                transform_resources=sagemaker.CfnModelPackage.TransformResourcesProperty(
                    instance_count=123,
                    instance_type="instanceType",

                    # the properties below are optional
                    volume_kms_key_id="volumeKmsKeyId"
                ),

                # the properties below are optional
                batch_strategy="batchStrategy",
                environment={
                    "environment_key": "environment"
                },
                max_concurrent_transforms=123,
                max_payload_in_mb=123
            )
        )],
        validation_role="validationRole"
    )
)
java
// 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;

CfnModelPackage cfnModelPackage = CfnModelPackage.Builder.create(this, "MyCfnModelPackage")
        .additionalInferenceSpecifications(List.of(AdditionalInferenceSpecificationDefinitionProperty.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")
                        .modelDataSource(ModelDataSourceProperty.builder()
                                .s3DataSource(S3ModelDataSourceProperty.builder()
                                        .compressionType("compressionType")
                                        .s3DataType("s3DataType")
                                        .s3Uri("s3Uri")

                                        // the properties below are optional
                                        .modelAccessConfig(ModelAccessConfigProperty.builder()
                                                .acceptEula(false)
                                                .build())
                                        .build())
                                .build())
                        .modelDataUrl("modelDataUrl")
                        .modelInput(modelInput)
                        .nearestModelName("nearestModelName")
                        .build()))
                .name("name")

                // the properties below are optional
                .description("description")
                .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()
                        .image("image")

                        // the properties below are optional
                        .containerHostname("containerHostname")
                        .environment(Map.of(
                                "environmentKey", "environment"))
                        .framework("framework")
                        .frameworkVersion("frameworkVersion")
                        .imageDigest("imageDigest")
                        .modelDataSource(ModelDataSourceProperty.builder()
                                .s3DataSource(S3ModelDataSourceProperty.builder()
                                        .compressionType("compressionType")
                                        .s3DataType("s3DataType")
                                        .s3Uri("s3Uri")

                                        // the properties below are optional
                                        .modelAccessConfig(ModelAccessConfigProperty.builder()
                                                .acceptEula(false)
                                                .build())
                                        .build())
                                .build())
                        .modelDataUrl("modelDataUrl")
                        .modelInput(modelInput)
                        .nearestModelName("nearestModelName")
                        .build()))
                .name("name")

                // the properties below are optional
                .description("description")
                .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()
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .contentType("contentType")
                                .build())
                        .postTrainingConstraints(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .preTrainingConstraints(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .build())
                .explainability(DriftCheckExplainabilityProperty.builder()
                        .configFile(FileSourceProperty.builder()
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .contentType("contentType")
                                .build())
                        .constraints(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .build())
                .modelDataQuality(DriftCheckModelDataQualityProperty.builder()
                        .constraints(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .statistics(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .build())
                .modelQuality(DriftCheckModelQualityProperty.builder()
                        .constraints(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .statistics(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .build())
                .build())
        .inferenceSpecification(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")
                        .modelDataSource(ModelDataSourceProperty.builder()
                                .s3DataSource(S3ModelDataSourceProperty.builder()
                                        .compressionType("compressionType")
                                        .s3DataType("s3DataType")
                                        .s3Uri("s3Uri")

                                        // the properties below are optional
                                        .modelAccessConfig(ModelAccessConfigProperty.builder()
                                                .acceptEula(false)
                                                .build())
                                        .build())
                                .build())
                        .modelDataUrl("modelDataUrl")
                        .modelInput(modelInput)
                        .nearestModelName("nearestModelName")
                        .build()))
                .supportedContentTypes(List.of("supportedContentTypes"))
                .supportedResponseMimeTypes(List.of("supportedResponseMimeTypes"))

                // the properties below are optional
                .supportedRealtimeInferenceInstanceTypes(List.of("supportedRealtimeInferenceInstanceTypes"))
                .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()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .preTrainingReport(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .report(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .build())
                .explainability(ExplainabilityProperty.builder()
                        .report(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .build())
                .modelDataQuality(ModelDataQualityProperty.builder()
                        .constraints(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .statistics(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .build())
                .modelQuality(ModelQualityProperty.builder()
                        .constraints(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .statistics(MetricsSourceProperty.builder()
                                .contentType("contentType")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .contentDigest("contentDigest")
                                .build())
                        .build())
                .build())
        .modelPackageDescription("modelPackageDescription")
        .modelPackageGroupName("modelPackageGroupName")
        .modelPackageName("modelPackageName")
        .modelPackageStatusDetails(ModelPackageStatusDetailsProperty.builder()
                .validationStatuses(List.of(ModelPackageStatusItemProperty.builder()
                        .name("name")
                        .status("status")

                        // the properties below are optional
                        .failureReason("failureReason")
                        .build()))
                .build())
        .modelPackageVersion(123)
        .samplePayloadUrl("samplePayloadUrl")
        .securityConfig(SecurityConfigProperty.builder()
                .kmsKeyId("kmsKeyId")
                .build())
        .skipModelValidation("skipModelValidation")
        .sourceAlgorithmSpecification(SourceAlgorithmSpecificationProperty.builder()
                .sourceAlgorithms(List.of(SourceAlgorithmProperty.builder()
                        .algorithmName("algorithmName")

                        // the properties below are optional
                        .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()
                                .transformInput(TransformInputProperty.builder()
                                        .dataSource(DataSourceProperty.builder()
                                                .s3DataSource(S3DataSourceProperty.builder()
                                                        .s3DataType("s3DataType")
                                                        .s3Uri("s3Uri")
                                                        .build())
                                                .build())

                                        // the properties below are optional
                                        .compressionType("compressionType")
                                        .contentType("contentType")
                                        .splitType("splitType")
                                        .build())
                                .transformOutput(TransformOutputProperty.builder()
                                        .s3OutputPath("s3OutputPath")

                                        // the properties below are optional
                                        .accept("accept")
                                        .assembleWith("assembleWith")
                                        .kmsKeyId("kmsKeyId")
                                        .build())
                                .transformResources(TransformResourcesProperty.builder()
                                        .instanceCount(123)
                                        .instanceType("instanceType")

                                        // the properties below are optional
                                        .volumeKmsKeyId("volumeKmsKeyId")
                                        .build())

                                // the properties below are optional
                                .batchStrategy("batchStrategy")
                                .environment(Map.of(
                                        "environmentKey", "environment"))
                                .maxConcurrentTransforms(123)
                                .maxPayloadInMb(123)
                                .build())
                        .build()))
                .validationRole("validationRole")
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var modelInput;

var cfnModelPackage = new CfnModelPackage(this, "MyCfnModelPackage", new CfnModelPackageProps {
    AdditionalInferenceSpecifications = new [] { new AdditionalInferenceSpecificationDefinitionProperty {
        Containers = new [] { new ModelPackageContainerDefinitionProperty {
            Image = "image",

            // the properties below are optional
            ContainerHostname = "containerHostname",
            Environment = new Dictionary<string, string> {
                { "environmentKey", "environment" }
            },
            Framework = "framework",
            FrameworkVersion = "frameworkVersion",
            ImageDigest = "imageDigest",
            ModelDataSource = new ModelDataSourceProperty {
                S3DataSource = new S3ModelDataSourceProperty {
                    CompressionType = "compressionType",
                    S3DataType = "s3DataType",
                    S3Uri = "s3Uri",

                    // the properties below are optional
                    ModelAccessConfig = new ModelAccessConfigProperty {
                        AcceptEula = false
                    }
                }
            },
            ModelDataUrl = "modelDataUrl",
            ModelInput = modelInput,
            NearestModelName = "nearestModelName"
        } },
        Name = "name",

        // the properties below are optional
        Description = "description",
        SupportedContentTypes = new [] { "supportedContentTypes" },
        SupportedRealtimeInferenceInstanceTypes = new [] { "supportedRealtimeInferenceInstanceTypes" },
        SupportedResponseMimeTypes = new [] { "supportedResponseMimeTypes" },
        SupportedTransformInstanceTypes = new [] { "supportedTransformInstanceTypes" }
    } },
    AdditionalInferenceSpecificationsToAdd = new [] { new AdditionalInferenceSpecificationDefinitionProperty {
        Containers = new [] { new ModelPackageContainerDefinitionProperty {
            Image = "image",

            // the properties below are optional
            ContainerHostname = "containerHostname",
            Environment = new Dictionary<string, string> {
                { "environmentKey", "environment" }
            },
            Framework = "framework",
            FrameworkVersion = "frameworkVersion",
            ImageDigest = "imageDigest",
            ModelDataSource = new ModelDataSourceProperty {
                S3DataSource = new S3ModelDataSourceProperty {
                    CompressionType = "compressionType",
                    S3DataType = "s3DataType",
                    S3Uri = "s3Uri",

                    // the properties below are optional
                    ModelAccessConfig = new ModelAccessConfigProperty {
                        AcceptEula = false
                    }
                }
            },
            ModelDataUrl = "modelDataUrl",
            ModelInput = modelInput,
            NearestModelName = "nearestModelName"
        } },
        Name = "name",

        // the properties below are optional
        Description = "description",
        SupportedContentTypes = new [] { "supportedContentTypes" },
        SupportedRealtimeInferenceInstanceTypes = new [] { "supportedRealtimeInferenceInstanceTypes" },
        SupportedResponseMimeTypes = new [] { "supportedResponseMimeTypes" },
        SupportedTransformInstanceTypes = new [] { "supportedTransformInstanceTypes" }
    } },
    ApprovalDescription = "approvalDescription",
    CertifyForMarketplace = false,
    ClientToken = "clientToken",
    CustomerMetadataProperties = new Dictionary<string, string> {
        { "customerMetadataPropertiesKey", "customerMetadataProperties" }
    },
    Domain = "domain",
    DriftCheckBaselines = new DriftCheckBaselinesProperty {
        Bias = new DriftCheckBiasProperty {
            ConfigFile = new FileSourceProperty {
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest",
                ContentType = "contentType"
            },
            PostTrainingConstraints = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            },
            PreTrainingConstraints = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            }
        },
        Explainability = new DriftCheckExplainabilityProperty {
            ConfigFile = new FileSourceProperty {
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest",
                ContentType = "contentType"
            },
            Constraints = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            }
        },
        ModelDataQuality = new DriftCheckModelDataQualityProperty {
            Constraints = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            },
            Statistics = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            }
        },
        ModelQuality = new DriftCheckModelQualityProperty {
            Constraints = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            },
            Statistics = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            }
        }
    },
    InferenceSpecification = new InferenceSpecificationProperty {
        Containers = new [] { new ModelPackageContainerDefinitionProperty {
            Image = "image",

            // the properties below are optional
            ContainerHostname = "containerHostname",
            Environment = new Dictionary<string, string> {
                { "environmentKey", "environment" }
            },
            Framework = "framework",
            FrameworkVersion = "frameworkVersion",
            ImageDigest = "imageDigest",
            ModelDataSource = new ModelDataSourceProperty {
                S3DataSource = new S3ModelDataSourceProperty {
                    CompressionType = "compressionType",
                    S3DataType = "s3DataType",
                    S3Uri = "s3Uri",

                    // the properties below are optional
                    ModelAccessConfig = new ModelAccessConfigProperty {
                        AcceptEula = false
                    }
                }
            },
            ModelDataUrl = "modelDataUrl",
            ModelInput = modelInput,
            NearestModelName = "nearestModelName"
        } },
        SupportedContentTypes = new [] { "supportedContentTypes" },
        SupportedResponseMimeTypes = new [] { "supportedResponseMimeTypes" },

        // the properties below are optional
        SupportedRealtimeInferenceInstanceTypes = new [] { "supportedRealtimeInferenceInstanceTypes" },
        SupportedTransformInstanceTypes = new [] { "supportedTransformInstanceTypes" }
    },
    LastModifiedTime = "lastModifiedTime",
    MetadataProperties = new MetadataPropertiesProperty {
        CommitId = "commitId",
        GeneratedBy = "generatedBy",
        ProjectId = "projectId",
        Repository = "repository"
    },
    ModelApprovalStatus = "modelApprovalStatus",
    ModelCard = new ModelCardProperty {
        ModelCardContent = "modelCardContent",
        ModelCardStatus = "modelCardStatus"
    },
    ModelMetrics = new ModelMetricsProperty {
        Bias = new BiasProperty {
            PostTrainingReport = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            },
            PreTrainingReport = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            },
            Report = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            }
        },
        Explainability = new ExplainabilityProperty {
            Report = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            }
        },
        ModelDataQuality = new ModelDataQualityProperty {
            Constraints = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            },
            Statistics = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            }
        },
        ModelQuality = new ModelQualityProperty {
            Constraints = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            },
            Statistics = new MetricsSourceProperty {
                ContentType = "contentType",
                S3Uri = "s3Uri",

                // the properties below are optional
                ContentDigest = "contentDigest"
            }
        }
    },
    ModelPackageDescription = "modelPackageDescription",
    ModelPackageGroupName = "modelPackageGroupName",
    ModelPackageName = "modelPackageName",
    ModelPackageStatusDetails = new ModelPackageStatusDetailsProperty {
        ValidationStatuses = new [] { new ModelPackageStatusItemProperty {
            Name = "name",
            Status = "status",

            // the properties below are optional
            FailureReason = "failureReason"
        } }
    },
    ModelPackageVersion = 123,
    SamplePayloadUrl = "samplePayloadUrl",
    SecurityConfig = new SecurityConfigProperty {
        KmsKeyId = "kmsKeyId"
    },
    SkipModelValidation = "skipModelValidation",
    SourceAlgorithmSpecification = new SourceAlgorithmSpecificationProperty {
        SourceAlgorithms = new [] { new SourceAlgorithmProperty {
            AlgorithmName = "algorithmName",

            // the properties below are optional
            ModelDataUrl = "modelDataUrl"
        } }
    },
    SourceUri = "sourceUri",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    Task = "task",
    ValidationSpecification = new ValidationSpecificationProperty {
        ValidationProfiles = new [] { new ValidationProfileProperty {
            ProfileName = "profileName",
            TransformJobDefinition = new TransformJobDefinitionProperty {
                TransformInput = new TransformInputProperty {
                    DataSource = new DataSourceProperty {
                        S3DataSource = new S3DataSourceProperty {
                            S3DataType = "s3DataType",
                            S3Uri = "s3Uri"
                        }
                    },

                    // the properties below are optional
                    CompressionType = "compressionType",
                    ContentType = "contentType",
                    SplitType = "splitType"
                },
                TransformOutput = new TransformOutputProperty {
                    S3OutputPath = "s3OutputPath",

                    // the properties below are optional
                    Accept = "accept",
                    AssembleWith = "assembleWith",
                    KmsKeyId = "kmsKeyId"
                },
                TransformResources = new TransformResourcesProperty {
                    InstanceCount = 123,
                    InstanceType = "instanceType",

                    // the properties below are optional
                    VolumeKmsKeyId = "volumeKmsKeyId"
                },

                // the properties below are optional
                BatchStrategy = "batchStrategy",
                Environment = new Dictionary<string, string> {
                    { "environmentKey", "environment" }
                },
                MaxConcurrentTransforms = 123,
                MaxPayloadInMb = 123
            }
        } },
        ValidationRole = "validationRole"
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var modelInput interface{}

cfnModelPackage := awscdk.Aws_sagemaker.NewCfnModelPackage(this, jsii.String("MyCfnModelPackage"), &CfnModelPackageProps{
	AdditionalInferenceSpecifications: []interface{}{
		&AdditionalInferenceSpecificationDefinitionProperty{
			Containers: []interface{}{
				&ModelPackageContainerDefinitionProperty{
					Image: jsii.String("image"),

					// the properties below are optional
					ContainerHostname: jsii.String("containerHostname"),
					Environment: map[string]*string{
						"environmentKey": jsii.String("environment"),
					},
					Framework: jsii.String("framework"),
					FrameworkVersion: jsii.String("frameworkVersion"),
					ImageDigest: jsii.String("imageDigest"),
					ModelDataSource: &ModelDataSourceProperty{
						S3DataSource: &S3ModelDataSourceProperty{
							CompressionType: jsii.String("compressionType"),
							S3DataType: jsii.String("s3DataType"),
							S3Uri: jsii.String("s3Uri"),

							// the properties below are optional
							ModelAccessConfig: &ModelAccessConfigProperty{
								AcceptEula: jsii.Boolean(false),
							},
						},
					},
					ModelDataUrl: jsii.String("modelDataUrl"),
					ModelInput: modelInput,
					NearestModelName: jsii.String("nearestModelName"),
				},
			},
			Name: jsii.String("name"),

			// the properties below are optional
			Description: jsii.String("description"),
			SupportedContentTypes: []*string{
				jsii.String("supportedContentTypes"),
			},
			SupportedRealtimeInferenceInstanceTypes: []*string{
				jsii.String("supportedRealtimeInferenceInstanceTypes"),
			},
			SupportedResponseMimeTypes: []*string{
				jsii.String("supportedResponseMimeTypes"),
			},
			SupportedTransformInstanceTypes: []*string{
				jsii.String("supportedTransformInstanceTypes"),
			},
		},
	},
	AdditionalInferenceSpecificationsToAdd: []interface{}{
		&AdditionalInferenceSpecificationDefinitionProperty{
			Containers: []interface{}{
				&ModelPackageContainerDefinitionProperty{
					Image: jsii.String("image"),

					// the properties below are optional
					ContainerHostname: jsii.String("containerHostname"),
					Environment: map[string]*string{
						"environmentKey": jsii.String("environment"),
					},
					Framework: jsii.String("framework"),
					FrameworkVersion: jsii.String("frameworkVersion"),
					ImageDigest: jsii.String("imageDigest"),
					ModelDataSource: &ModelDataSourceProperty{
						S3DataSource: &S3ModelDataSourceProperty{
							CompressionType: jsii.String("compressionType"),
							S3DataType: jsii.String("s3DataType"),
							S3Uri: jsii.String("s3Uri"),

							// the properties below are optional
							ModelAccessConfig: &ModelAccessConfigProperty{
								AcceptEula: jsii.Boolean(false),
							},
						},
					},
					ModelDataUrl: jsii.String("modelDataUrl"),
					ModelInput: modelInput,
					NearestModelName: jsii.String("nearestModelName"),
				},
			},
			Name: jsii.String("name"),

			// the properties below are optional
			Description: jsii.String("description"),
			SupportedContentTypes: []*string{
				jsii.String("supportedContentTypes"),
			},
			SupportedRealtimeInferenceInstanceTypes: []*string{
				jsii.String("supportedRealtimeInferenceInstanceTypes"),
			},
			SupportedResponseMimeTypes: []*string{
				jsii.String("supportedResponseMimeTypes"),
			},
			SupportedTransformInstanceTypes: []*string{
				jsii.String("supportedTransformInstanceTypes"),
			},
		},
	},
	ApprovalDescription: jsii.String("approvalDescription"),
	CertifyForMarketplace: jsii.Boolean(false),
	ClientToken: jsii.String("clientToken"),
	CustomerMetadataProperties: map[string]*string{
		"customerMetadataPropertiesKey": jsii.String("customerMetadataProperties"),
	},
	Domain: jsii.String("domain"),
	DriftCheckBaselines: &DriftCheckBaselinesProperty{
		Bias: &DriftCheckBiasProperty{
			ConfigFile: &FileSourceProperty{
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
				ContentType: jsii.String("contentType"),
			},
			PostTrainingConstraints: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
			PreTrainingConstraints: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
		},
		Explainability: &DriftCheckExplainabilityProperty{
			ConfigFile: &FileSourceProperty{
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
				ContentType: jsii.String("contentType"),
			},
			Constraints: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
		},
		ModelDataQuality: &DriftCheckModelDataQualityProperty{
			Constraints: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
			Statistics: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
		},
		ModelQuality: &DriftCheckModelQualityProperty{
			Constraints: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
			Statistics: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
		},
	},
	InferenceSpecification: &InferenceSpecificationProperty{
		Containers: []interface{}{
			&ModelPackageContainerDefinitionProperty{
				Image: jsii.String("image"),

				// the properties below are optional
				ContainerHostname: jsii.String("containerHostname"),
				Environment: map[string]*string{
					"environmentKey": jsii.String("environment"),
				},
				Framework: jsii.String("framework"),
				FrameworkVersion: jsii.String("frameworkVersion"),
				ImageDigest: jsii.String("imageDigest"),
				ModelDataSource: &ModelDataSourceProperty{
					S3DataSource: &S3ModelDataSourceProperty{
						CompressionType: jsii.String("compressionType"),
						S3DataType: jsii.String("s3DataType"),
						S3Uri: jsii.String("s3Uri"),

						// the properties below are optional
						ModelAccessConfig: &ModelAccessConfigProperty{
							AcceptEula: jsii.Boolean(false),
						},
					},
				},
				ModelDataUrl: jsii.String("modelDataUrl"),
				ModelInput: modelInput,
				NearestModelName: jsii.String("nearestModelName"),
			},
		},
		SupportedContentTypes: []*string{
			jsii.String("supportedContentTypes"),
		},
		SupportedResponseMimeTypes: []*string{
			jsii.String("supportedResponseMimeTypes"),
		},

		// the properties below are optional
		SupportedRealtimeInferenceInstanceTypes: []*string{
			jsii.String("supportedRealtimeInferenceInstanceTypes"),
		},
		SupportedTransformInstanceTypes: []*string{
			jsii.String("supportedTransformInstanceTypes"),
		},
	},
	LastModifiedTime: jsii.String("lastModifiedTime"),
	MetadataProperties: &MetadataPropertiesProperty{
		CommitId: jsii.String("commitId"),
		GeneratedBy: jsii.String("generatedBy"),
		ProjectId: jsii.String("projectId"),
		Repository: jsii.String("repository"),
	},
	ModelApprovalStatus: jsii.String("modelApprovalStatus"),
	ModelCard: &ModelCardProperty{
		ModelCardContent: jsii.String("modelCardContent"),
		ModelCardStatus: jsii.String("modelCardStatus"),
	},
	ModelMetrics: &ModelMetricsProperty{
		Bias: &BiasProperty{
			PostTrainingReport: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
			PreTrainingReport: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
			Report: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
		},
		Explainability: &ExplainabilityProperty{
			Report: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
		},
		ModelDataQuality: &ModelDataQualityProperty{
			Constraints: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
			Statistics: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
		},
		ModelQuality: &ModelQualityProperty{
			Constraints: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
			Statistics: &MetricsSourceProperty{
				ContentType: jsii.String("contentType"),
				S3Uri: jsii.String("s3Uri"),

				// the properties below are optional
				ContentDigest: jsii.String("contentDigest"),
			},
		},
	},
	ModelPackageDescription: jsii.String("modelPackageDescription"),
	ModelPackageGroupName: jsii.String("modelPackageGroupName"),
	ModelPackageName: jsii.String("modelPackageName"),
	ModelPackageStatusDetails: &ModelPackageStatusDetailsProperty{
		ValidationStatuses: []interface{}{
			&ModelPackageStatusItemProperty{
				Name: jsii.String("name"),
				Status: jsii.String("status"),

				// the properties below are optional
				FailureReason: jsii.String("failureReason"),
			},
		},
	},
	ModelPackageVersion: jsii.Number(123),
	SamplePayloadUrl: jsii.String("samplePayloadUrl"),
	SecurityConfig: &SecurityConfigProperty{
		KmsKeyId: jsii.String("kmsKeyId"),
	},
	SkipModelValidation: jsii.String("skipModelValidation"),
	SourceAlgorithmSpecification: &SourceAlgorithmSpecificationProperty{
		SourceAlgorithms: []interface{}{
			&SourceAlgorithmProperty{
				AlgorithmName: jsii.String("algorithmName"),

				// the properties below are optional
				ModelDataUrl: jsii.String("modelDataUrl"),
			},
		},
	},
	SourceUri: jsii.String("sourceUri"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	Task: jsii.String("task"),
	ValidationSpecification: &ValidationSpecificationProperty{
		ValidationProfiles: []interface{}{
			&ValidationProfileProperty{
				ProfileName: jsii.String("profileName"),
				TransformJobDefinition: &TransformJobDefinitionProperty{
					TransformInput: &TransformInputProperty{
						DataSource: &DataSourceProperty{
							S3DataSource: &S3DataSourceProperty{
								S3DataType: jsii.String("s3DataType"),
								S3Uri: jsii.String("s3Uri"),
							},
						},

						// the properties below are optional
						CompressionType: jsii.String("compressionType"),
						ContentType: jsii.String("contentType"),
						SplitType: jsii.String("splitType"),
					},
					TransformOutput: &TransformOutputProperty{
						S3OutputPath: jsii.String("s3OutputPath"),

						// the properties below are optional
						Accept: jsii.String("accept"),
						AssembleWith: jsii.String("assembleWith"),
						KmsKeyId: jsii.String("kmsKeyId"),
					},
					TransformResources: &TransformResourcesProperty{
						InstanceCount: jsii.Number(123),
						InstanceType: jsii.String("instanceType"),

						// the properties below are optional
						VolumeKmsKeyId: jsii.String("volumeKmsKeyId"),
					},

					// the properties below are optional
					BatchStrategy: jsii.String("batchStrategy"),
					Environment: map[string]*string{
						"environmentKey": jsii.String("environment"),
					},
					MaxConcurrentTransforms: jsii.Number(123),
					MaxPayloadInMb: jsii.Number(123),
				},
			},
		},
		ValidationRole: jsii.String("validationRole"),
	},
})

Initializer ​

ts
new CfnModelPackage(scope: Construct, id: string, props?: CfnModelPackageProps)
python
CfnModelPackage(scope: Construct, id: str, props: typing.Optional[CfnModelPackageProps] = None)
java
new CfnModelPackage(Construct scope, String id, CfnModelPackageProps props)
csharp
new CfnModelPackage(Construct scope, string id, CfnModelPackageProps? props = null)
go
NewCfnModelPackage(Scope Construct, Id *string, Props CfnModelPackageProps)

Construct Props ​

additionalInferenceSpecificationsoptionalIResolvable | IResolvable | CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty[]additional_inference_specificationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AdditionalInferenceSpecificationDefinitionProperty]]]additionalInferenceSpecificationsoptionalIResolvableAdditionalInferenceSpecificationsoptionalIResolvableAdditionalInferenceSpecificationsoptionalinterface{}#
An array of additional Inference Specification objects.
additionalInferenceSpecificationsToAddoptionalIResolvable | IResolvable | CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty[]additional_inference_specifications_to_addoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AdditionalInferenceSpecificationDefinitionProperty]]]additionalInferenceSpecificationsToAddoptionalIResolvableAdditionalInferenceSpecificationsToAddoptionalIResolvableAdditionalInferenceSpecificationsToAddoptionalinterface{}#
An array of additional Inference Specification objects to be added to the existing array.
notes

The total number of additional Inference Specification objects cannot exceed 15. Each additional Inference Specification object specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.

approvalDescriptionoptionalstringapproval_descriptionoptionalstrapprovalDescriptionoptionalStringApprovalDescriptionoptionalstringApprovalDescriptionoptional*string#
A description provided when the model approval is set.
certifyForMarketplaceoptionalboolean | IResolvablecertify_for_marketplaceoptionaltyping.Union[bool, IResolvable]certifyForMarketplaceoptionalBooleanCertifyForMarketplaceoptionalboolCertifyForMarketplaceoptionalinterface{}#
Whether the model package is to be certified to be listed on AWS Marketplace.

For information about listing model packages on AWS Marketplace, see List Your Algorithm or Model Package on AWS Marketplace .

clientTokenoptionalstringclient_tokenoptionalstrclientTokenoptionalStringClientTokenoptionalstringClientTokenoptional*string#
A unique token that guarantees that the call to this API is idempotent.
customerMetadataPropertiesoptionalIResolvable | { [key: string]: string }customer_metadata_propertiesoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]customerMetadataPropertiesoptionalIResolvableCustomerMetadataPropertiesoptionalIResolvableCustomerMetadataPropertiesoptionalinterface{}#
The metadata properties for the model package.
domainoptionalstringdomainoptionalstrdomainoptionalStringDomainoptionalstringDomainoptional*string#
The machine learning domain of your model package and its components.

Common machine learning domains include computer vision and natural language processing.

driftCheckBaselinesoptionalIResolvable | CfnModelPackage.DriftCheckBaselinesPropertydrift_check_baselinesoptionaltyping.Union[IResolvable, DriftCheckBaselinesProperty]driftCheckBaselinesoptionalIResolvableDriftCheckBaselinesoptionalIResolvableDriftCheckBaselinesoptionalinterface{}#
Represents the drift check baselines that can be used when the model monitor is set using the model package.
inferenceSpecificationoptionalIResolvable | CfnModelPackage.InferenceSpecificationPropertyinference_specificationoptionaltyping.Union[IResolvable, InferenceSpecificationProperty]inferenceSpecificationoptionalIResolvableInferenceSpecificationoptionalIResolvableInferenceSpecificationoptionalinterface{}#
Defines how to perform inference generation after a training job is run.
lastModifiedTimeoptionalstringlast_modified_timeoptionalstrlastModifiedTimeoptionalStringLastModifiedTimeoptionalstringLastModifiedTimeoptional*string#
The last time the model package was modified.
metadataPropertiesoptionalIResolvable | CfnModelPackage.MetadataPropertiesPropertymetadata_propertiesoptionaltyping.Union[IResolvable, MetadataPropertiesProperty]metadataPropertiesoptionalIResolvableMetadataPropertiesoptionalIResolvableMetadataPropertiesoptionalinterface{}#
Metadata properties of the tracking entity, trial, or trial component.
modelApprovalStatusoptionalstringmodel_approval_statusoptionalstrmodelApprovalStatusoptionalStringModelApprovalStatusoptionalstringModelApprovalStatusoptional*string#
The approval status of the model. This can be one of the following values.
  • APPROVED - The model is approved
  • REJECTED - The model is rejected.
  • PENDING_MANUAL_APPROVAL - The model is waiting for manual approval.
modelCardoptionalIResolvable | CfnModelPackage.ModelCardPropertymodel_cardoptionaltyping.Union[IResolvable, ModelCardProperty]modelCardoptionalIResolvableModelCardoptionalIResolvableModelCardoptionalinterface{}#
An Amazon SageMaker Model Card.
modelMetricsoptionalIResolvable | CfnModelPackage.ModelMetricsPropertymodel_metricsoptionaltyping.Union[IResolvable, ModelMetricsProperty]modelMetricsoptionalIResolvableModelMetricsoptionalIResolvableModelMetricsoptionalinterface{}#
Metrics for the model.
modelPackageDescriptionoptionalstringmodel_package_descriptionoptionalstrmodelPackageDescriptionoptionalStringModelPackageDescriptionoptionalstringModelPackageDescriptionoptional*string#
The description of the model package.
modelPackageGroupNameoptionalstringmodel_package_group_nameoptionalstrmodelPackageGroupNameoptionalStringModelPackageGroupNameoptionalstringModelPackageGroupNameoptional*string#
The model group to which the model belongs.
modelPackageNameoptionalstringmodel_package_nameoptionalstrmodelPackageNameoptionalStringModelPackageNameoptionalstringModelPackageNameoptional*string#
The name of the model package. The name can be as follows:.
  • For a versioned model, the name is automatically generated by SageMaker Model Registry and follows the format ' ModelPackageGroupName/ModelPackageVersion '.
  • For an unversioned model, you must provide the name.
modelPackageStatusDetailsoptionalIResolvable | CfnModelPackage.ModelPackageStatusDetailsPropertymodel_package_status_detailsoptionaltyping.Union[IResolvable, ModelPackageStatusDetailsProperty]modelPackageStatusDetailsoptionalIResolvableModelPackageStatusDetailsoptionalIResolvableModelPackageStatusDetailsoptionalinterface{}#
Specifies the validation and image scan statuses of the model package.
modelPackageVersionoptionalnumbermodel_package_versionoptionalint | floatmodelPackageVersionoptionalNumberModelPackageVersionoptionaldoubleModelPackageVersionoptional*float64#
The version number of a versioned model.
samplePayloadUrloptionalstringsample_payload_urloptionalstrsamplePayloadUrloptionalStringSamplePayloadUrloptionalstringSamplePayloadUrloptional*string#
The Amazon Simple Storage Service path where the sample payload are stored.

This path must point to a single gzip compressed tar archive (.tar.gz suffix).

securityConfigoptionalIResolvable | CfnModelPackage.SecurityConfigPropertysecurity_configoptionaltyping.Union[IResolvable, SecurityConfigProperty]securityConfigoptionalIResolvableSecurityConfigoptionalIResolvableSecurityConfigoptionalinterface{}#
An optional AWS Key Management Service key to encrypt, decrypt, and re-encrypt model package information for regulated workloads with highly sensitive data.
skipModelValidationoptionalstringskip_model_validationoptionalstrskipModelValidationoptionalStringSkipModelValidationoptionalstringSkipModelValidationoptional*string#
Indicates if you want to skip model validation.
sourceAlgorithmSpecificationoptionalIResolvable | CfnModelPackage.SourceAlgorithmSpecificationPropertysource_algorithm_specificationoptionaltyping.Union[IResolvable, SourceAlgorithmSpecificationProperty]sourceAlgorithmSpecificationoptionalIResolvableSourceAlgorithmSpecificationoptionalIResolvableSourceAlgorithmSpecificationoptionalinterface{}#
A list of algorithms that were used to create a model package.
sourceUrioptionalstringsource_urioptionalstrsourceUrioptionalStringSourceUrioptionalstringSourceUrioptional*string#
The URI of the source for the model package.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
A list of the tags associated with the model package.

For more information, see Tagging AWS resources in the AWS General Reference Guide .

taskoptionalstringtaskoptionalstrtaskoptionalStringTaskoptionalstringTaskoptional*string#
The machine learning task your model package accomplishes.

Common machine learning tasks include object detection and image classification.

validationSpecificationoptionalIResolvable | CfnModelPackage.ValidationSpecificationPropertyvalidation_specificationoptionaltyping.Union[IResolvable, ValidationSpecificationProperty]validationSpecificationoptionalIResolvableValidationSpecificationoptionalIResolvableValidationSpecificationoptionalinterface{}#
Specifies batch transform jobs that SageMaker runs to validate your model package.

Properties ​

additionalInferenceSpecificationsmay be undefinedIResolvable | IResolvable | CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty[]additional_inference_specificationsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AdditionalInferenceSpecificationDefinitionProperty]]]additionalInferenceSpecificationsmay be undefinedIResolvableAdditionalInferenceSpecificationsmay be undefinedIResolvableAdditionalInferenceSpecificationsmay be undefinedinterface{}#
An array of additional Inference Specification objects.
additionalInferenceSpecificationsToAddmay be undefinedIResolvable | IResolvable | CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty[]additional_inference_specifications_to_addmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AdditionalInferenceSpecificationDefinitionProperty]]]additionalInferenceSpecificationsToAddmay be undefinedIResolvableAdditionalInferenceSpecificationsToAddmay be undefinedIResolvableAdditionalInferenceSpecificationsToAddmay be undefinedinterface{}#
An array of additional Inference Specification objects to be added to the existing array.
approvalDescriptionmay be undefinedstringapproval_descriptionmay be undefinedstrapprovalDescriptionmay be undefinedStringApprovalDescriptionmay be undefinedstringApprovalDescriptionmay be undefined*string#
A description provided when the model approval is set.
attrCreationTimestringattr_creation_timestrattrCreationTimeStringAttrCreationTimestringAttrCreationTime*string#
The time that the model package was created.
attrLastModifiedTimestringattr_last_modified_timestrattrLastModifiedTimeStringAttrLastModifiedTimestringAttrLastModifiedTime*string#
The time at which the model package was last modified.
attrModelPackageArnstringattr_model_package_arnstrattrModelPackageArnStringAttrModelPackageArnstringAttrModelPackageArn*string#
The Amazon Resource Name (ARN) of the model package.
attrModelPackageStatusstringattr_model_package_statusstrattrModelPackageStatusStringAttrModelPackageStatusstringAttrModelPackageStatus*string#
The status of the model package. This can be one of the following values.
notes
  • PENDING - The model package creation is pending.
  • IN_PROGRESS - The model package is in the process of being created.
  • COMPLETED - The model package was successfully created.
  • FAILED - The model package creation failed.
  • DELETING - The model package is in the process of being deleted.
certifyForMarketplacemay be undefinedboolean | IResolvablecertify_for_marketplacemay be undefinedtyping.Union[bool, IResolvable]certifyForMarketplacemay be undefinedBooleanCertifyForMarketplacemay be undefinedboolCertifyForMarketplacemay be undefinedinterface{}#
Whether the model package is to be certified to be listed on AWS Marketplace.
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#
AWS resource type.
clientTokenmay be undefinedstringclient_tokenmay be undefinedstrclientTokenmay be undefinedStringClientTokenmay be undefinedstringClientTokenmay be undefined*string#
A unique token that guarantees that the call to this API is idempotent.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#
customerMetadataPropertiesmay be undefinedIResolvable | { [key: string]: string }customer_metadata_propertiesmay be undefinedtyping.Union[IResolvable, typing.Mapping[str, str]]customerMetadataPropertiesmay be undefinedIResolvableCustomerMetadataPropertiesmay be undefinedIResolvableCustomerMetadataPropertiesmay be undefinedinterface{}#
The metadata properties for the model package.
domainmay be undefinedstringdomainmay be undefinedstrdomainmay be undefinedStringDomainmay be undefinedstringDomainmay be undefined*string#
The machine learning domain of your model package and its components.
driftCheckBaselinesmay be undefinedIResolvable | CfnModelPackage.DriftCheckBaselinesPropertydrift_check_baselinesmay be undefinedtyping.Union[IResolvable, DriftCheckBaselinesProperty]driftCheckBaselinesmay be undefinedIResolvableDriftCheckBaselinesmay be undefinedIResolvableDriftCheckBaselinesmay be undefinedinterface{}#
Represents the drift check baselines that can be used when the model monitor is set using the model package.
inferenceSpecificationmay be undefinedIResolvable | CfnModelPackage.InferenceSpecificationPropertyinference_specificationmay be undefinedtyping.Union[IResolvable, InferenceSpecificationProperty]inferenceSpecificationmay be undefinedIResolvableInferenceSpecificationmay be undefinedIResolvableInferenceSpecificationmay be undefinedinterface{}#
Defines how to perform inference generation after a training job is run.
lastModifiedTimemay be undefinedstringlast_modified_timemay be undefinedstrlastModifiedTimemay be undefinedStringLastModifiedTimemay be undefinedstringLastModifiedTimemay be undefined*string#
The last time the model package was modified.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string#
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

metadataPropertiesmay be undefinedIResolvable | CfnModelPackage.MetadataPropertiesPropertymetadata_propertiesmay be undefinedtyping.Union[IResolvable, MetadataPropertiesProperty]metadataPropertiesmay be undefinedIResolvableMetadataPropertiesmay be undefinedIResolvableMetadataPropertiesmay be undefinedinterface{}#
Metadata properties of the tracking entity, trial, or trial component.
modelApprovalStatusmay be undefinedstringmodel_approval_statusmay be undefinedstrmodelApprovalStatusmay be undefinedStringModelApprovalStatusmay be undefinedstringModelApprovalStatusmay be undefined*string#
The approval status of the model.

This can be one of the following values.

modelCardmay be undefinedIResolvable | CfnModelPackage.ModelCardPropertymodel_cardmay be undefinedtyping.Union[IResolvable, ModelCardProperty]modelCardmay be undefinedIResolvableModelCardmay be undefinedIResolvableModelCardmay be undefinedinterface{}#
An Amazon SageMaker Model Card.
modelMetricsmay be undefinedIResolvable | CfnModelPackage.ModelMetricsPropertymodel_metricsmay be undefinedtyping.Union[IResolvable, ModelMetricsProperty]modelMetricsmay be undefinedIResolvableModelMetricsmay be undefinedIResolvableModelMetricsmay be undefinedinterface{}#
Metrics for the model.
modelPackageDescriptionmay be undefinedstringmodel_package_descriptionmay be undefinedstrmodelPackageDescriptionmay be undefinedStringModelPackageDescriptionmay be undefinedstringModelPackageDescriptionmay be undefined*string#
The description of the model package.
modelPackageGroupNamemay be undefinedstringmodel_package_group_namemay be undefinedstrmodelPackageGroupNamemay be undefinedStringModelPackageGroupNamemay be undefinedstringModelPackageGroupNamemay be undefined*string#
The model group to which the model belongs.
modelPackageNamemay be undefinedstringmodel_package_namemay be undefinedstrmodelPackageNamemay be undefinedStringModelPackageNamemay be undefinedstringModelPackageNamemay be undefined*string#
The name of the model package.

The name can be as follows:.

modelPackageRefModelPackageReferencemodel_package_refModelPackageReferencemodelPackageRefModelPackageReferenceModelPackageRefModelPackageReferenceModelPackageRefModelPackageReference#
A reference to a ModelPackage resource.
modelPackageStatusDetailsmay be undefinedIResolvable | CfnModelPackage.ModelPackageStatusDetailsPropertymodel_package_status_detailsmay be undefinedtyping.Union[IResolvable, ModelPackageStatusDetailsProperty]modelPackageStatusDetailsmay be undefinedIResolvableModelPackageStatusDetailsmay be undefinedIResolvableModelPackageStatusDetailsmay be undefinedinterface{}#
Specifies the validation and image scan statuses of the model package.
modelPackageVersionmay be undefinednumbermodel_package_versionmay be undefinedint | floatmodelPackageVersionmay be undefinedNumberModelPackageVersionmay be undefineddoubleModelPackageVersionmay be undefined*float64#
The version number of a versioned model.
nodeNodenodeNodenodeNodeNodeNodeNodeNode#
The tree node.
refstringrefstrrefStringRefstringRef*string#
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

samplePayloadUrlmay be undefinedstringsample_payload_urlmay be undefinedstrsamplePayloadUrlmay be undefinedStringSamplePayloadUrlmay be undefinedstringSamplePayloadUrlmay be undefined*string#
The Amazon Simple Storage Service path where the sample payload are stored.
securityConfigmay be undefinedIResolvable | CfnModelPackage.SecurityConfigPropertysecurity_configmay be undefinedtyping.Union[IResolvable, SecurityConfigProperty]securityConfigmay be undefinedIResolvableSecurityConfigmay be undefinedIResolvableSecurityConfigmay be undefinedinterface{}#
An optional AWS Key Management Service key to encrypt, decrypt, and re-encrypt model package information for regulated workloads with highly sensitive data.
skipModelValidationmay be undefinedstringskip_model_validationmay be undefinedstrskipModelValidationmay be undefinedStringSkipModelValidationmay be undefinedstringSkipModelValidationmay be undefined*string#
Indicates if you want to skip model validation.
sourceAlgorithmSpecificationmay be undefinedIResolvable | CfnModelPackage.SourceAlgorithmSpecificationPropertysource_algorithm_specificationmay be undefinedtyping.Union[IResolvable, SourceAlgorithmSpecificationProperty]sourceAlgorithmSpecificationmay be undefinedIResolvableSourceAlgorithmSpecificationmay be undefinedIResolvableSourceAlgorithmSpecificationmay be undefinedinterface{}#
A list of algorithms that were used to create a model package.
sourceUrimay be undefinedstringsource_urimay be undefinedstrsourceUrimay be undefinedStringSourceUrimay be undefinedstringSourceUrimay be undefined*string#
The URI of the source for the model package.
stackStackstackStackstackStackStackStackStackStack#
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Tag Manager which manages the tags for this resource.
tagsRawmay be undefinedCfnTag[]tags_rawmay be undefinedtyping.List[CfnTag]tagsRawmay be undefinedList<CfnTag>TagsRawmay be undefinedCfnTag[]TagsRawmay be undefined*[]CfnTag#
A list of the tags associated with the model package.
taskmay be undefinedstringtaskmay be undefinedstrtaskmay be undefinedStringTaskmay be undefinedstringTaskmay be undefined*string#
The machine learning task your model package accomplishes.
validationSpecificationmay be undefinedIResolvable | CfnModelPackage.ValidationSpecificationPropertyvalidation_specificationmay be undefinedtyping.Union[IResolvable, ValidationSpecificationProperty]validationSpecificationmay be undefinedIResolvableValidationSpecificationmay be undefinedIResolvableValidationSpecificationmay be undefinedinterface{}#
Specifies batch transform jobs that SageMaker runs to validate your model package.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#
Sets the deletion policy of the resource based on the removal policy specified.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

arnForModelPackage(resource: IModelPackageRef): string@staticmethod def arn_for_model_package(resource: IModelPackageRef) -> strpublic static String arnForModelPackage(IModelPackageRef resource)public static string ArnForModelPackage(IModelPackageRef resource)func ArnForModelPackage(Resource IModelPackageRef) *stringstatic#
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnModelPackage(x: any): boolean@staticmethod def is_cfn_model_package(x: Any) -> boolpublic static Boolean isCfnModelPackage(Object x)public static bool IsCfnModelPackage(object x)func IsCfnModelPackage(X interface{}) *boolstatic#
Checks whether the given object is a CfnModelPackage.
isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#
Check whether the given object is a CfnResource.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.