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
// 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',
},
});
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"
)
)
// 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();
// 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"
}
});
// 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
new CfnModelPackage(scope: Construct, id: string, props?: CfnModelPackageProps)
CfnModelPackage(scope: Construct, id: str, props: typing.Optional[CfnModelPackageProps] = None)
new CfnModelPackage(Construct scope, String id, CfnModelPackageProps props)
new CfnModelPackage(Construct scope, string id, CfnModelPackageProps? props = null)
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{}#additionalInferenceSpecificationsToAddoptionalIResolvable | IResolvable | CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty[]additional_inference_specifications_to_addoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AdditionalInferenceSpecificationDefinitionProperty]]]additionalInferenceSpecificationsToAddoptionalIResolvableAdditionalInferenceSpecificationsToAddoptionalIResolvableAdditionalInferenceSpecificationsToAddoptionalinterface{}#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#certifyForMarketplaceoptionalboolean | IResolvablecertify_for_marketplaceoptionaltyping.Union[bool, IResolvable]certifyForMarketplaceoptionalBooleanCertifyForMarketplaceoptionalboolCertifyForMarketplaceoptionalinterface{}#For information about listing model packages on AWS Marketplace, see List Your Algorithm or Model Package on AWS Marketplace .
clientTokenoptionalstringclient_tokenoptionalstrclientTokenoptionalStringClientTokenoptionalstringClientTokenoptional*string#customerMetadataPropertiesoptionalIResolvable | { [key: string]: string }customer_metadata_propertiesoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]customerMetadataPropertiesoptionalIResolvableCustomerMetadataPropertiesoptionalIResolvableCustomerMetadataPropertiesoptionalinterface{}#Common machine learning domains include computer vision and natural language processing.
driftCheckBaselinesoptionalIResolvable | CfnModelPackage.DriftCheckBaselinesPropertydrift_check_baselinesoptionaltyping.Union[IResolvable, DriftCheckBaselinesProperty]driftCheckBaselinesoptionalIResolvableDriftCheckBaselinesoptionalIResolvableDriftCheckBaselinesoptionalinterface{}#inferenceSpecificationoptionalIResolvable | CfnModelPackage.InferenceSpecificationPropertyinference_specificationoptionaltyping.Union[IResolvable, InferenceSpecificationProperty]inferenceSpecificationoptionalIResolvableInferenceSpecificationoptionalIResolvableInferenceSpecificationoptionalinterface{}#lastModifiedTimeoptionalstringlast_modified_timeoptionalstrlastModifiedTimeoptionalStringLastModifiedTimeoptionalstringLastModifiedTimeoptional*string#metadataPropertiesoptionalIResolvable | CfnModelPackage.MetadataPropertiesPropertymetadata_propertiesoptionaltyping.Union[IResolvable, MetadataPropertiesProperty]metadataPropertiesoptionalIResolvableMetadataPropertiesoptionalIResolvableMetadataPropertiesoptionalinterface{}#modelApprovalStatusoptionalstringmodel_approval_statusoptionalstrmodelApprovalStatusoptionalStringModelApprovalStatusoptionalstringModelApprovalStatusoptional*string#APPROVED- The model is approvedREJECTED- The model is rejected.PENDING_MANUAL_APPROVAL- The model is waiting for manual approval.
modelCardoptionalIResolvable | CfnModelPackage.ModelCardPropertymodel_cardoptionaltyping.Union[IResolvable, ModelCardProperty]modelCardoptionalIResolvableModelCardoptionalIResolvableModelCardoptionalinterface{}#modelMetricsoptionalIResolvable | CfnModelPackage.ModelMetricsPropertymodel_metricsoptionaltyping.Union[IResolvable, ModelMetricsProperty]modelMetricsoptionalIResolvableModelMetricsoptionalIResolvableModelMetricsoptionalinterface{}#modelPackageDescriptionoptionalstringmodel_package_descriptionoptionalstrmodelPackageDescriptionoptionalStringModelPackageDescriptionoptionalstringModelPackageDescriptionoptional*string#modelPackageGroupNameoptionalstringmodel_package_group_nameoptionalstrmodelPackageGroupNameoptionalStringModelPackageGroupNameoptionalstringModelPackageGroupNameoptional*string#modelPackageNameoptionalstringmodel_package_nameoptionalstrmodelPackageNameoptionalStringModelPackageNameoptionalstringModelPackageNameoptional*string#- 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{}#modelPackageVersionoptionalnumbermodel_package_versionoptionalint | floatmodelPackageVersionoptionalNumberModelPackageVersionoptionaldoubleModelPackageVersionoptional*float64#samplePayloadUrloptionalstringsample_payload_urloptionalstrsamplePayloadUrloptionalStringSamplePayloadUrloptionalstringSamplePayloadUrloptional*string#This path must point to a single gzip compressed tar archive (.tar.gz suffix).
securityConfigoptionalIResolvable | CfnModelPackage.SecurityConfigPropertysecurity_configoptionaltyping.Union[IResolvable, SecurityConfigProperty]securityConfigoptionalIResolvableSecurityConfigoptionalIResolvableSecurityConfigoptionalinterface{}#skipModelValidationoptionalstringskip_model_validationoptionalstrskipModelValidationoptionalStringSkipModelValidationoptionalstringSkipModelValidationoptional*string#sourceAlgorithmSpecificationoptionalIResolvable | CfnModelPackage.SourceAlgorithmSpecificationPropertysource_algorithm_specificationoptionaltyping.Union[IResolvable, SourceAlgorithmSpecificationProperty]sourceAlgorithmSpecificationoptionalIResolvableSourceAlgorithmSpecificationoptionalIResolvableSourceAlgorithmSpecificationoptionalinterface{}#sourceUrioptionalstringsource_urioptionalstrsourceUrioptionalStringSourceUrioptionalstringSourceUrioptional*string#tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#For more information, see Tagging AWS resources in the AWS General Reference Guide .
Common machine learning tasks include object detection and image classification.
validationSpecificationoptionalIResolvable | CfnModelPackage.ValidationSpecificationPropertyvalidation_specificationoptionaltyping.Union[IResolvable, ValidationSpecificationProperty]validationSpecificationoptionalIResolvableValidationSpecificationoptionalIResolvableValidationSpecificationoptionalinterface{}#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{}#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{}#approvalDescriptionmay be undefinedstringapproval_descriptionmay be undefinedstrapprovalDescriptionmay be undefinedStringApprovalDescriptionmay be undefinedstringApprovalDescriptionmay be undefined*string#attrCreationTimestringattr_creation_timestrattrCreationTimeStringAttrCreationTimestringAttrCreationTime*string#attrLastModifiedTimestringattr_last_modified_timestrattrLastModifiedTimeStringAttrLastModifiedTimestringAttrLastModifiedTime*string#attrModelPackageArnstringattr_model_package_arnstrattrModelPackageArnStringAttrModelPackageArnstringAttrModelPackageArn*string#attrModelPackageStatusstringattr_model_package_statusstrattrModelPackageStatusStringAttrModelPackageStatusstringAttrModelPackageStatus*string#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{}#CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptions#cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#clientTokenmay be undefinedstringclient_tokenmay be undefinedstrclientTokenmay be undefinedStringClientTokenmay be undefinedstringClientTokenmay be undefined*string#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{}#domainmay be undefinedstringdomainmay be undefinedstrdomainmay be undefinedStringDomainmay be undefinedstringDomainmay be undefined*string#driftCheckBaselinesmay be undefinedIResolvable | CfnModelPackage.DriftCheckBaselinesPropertydrift_check_baselinesmay be undefinedtyping.Union[IResolvable, DriftCheckBaselinesProperty]driftCheckBaselinesmay be undefinedIResolvableDriftCheckBaselinesmay be undefinedIResolvableDriftCheckBaselinesmay be undefinedinterface{}#inferenceSpecificationmay be undefinedIResolvable | CfnModelPackage.InferenceSpecificationPropertyinference_specificationmay be undefinedtyping.Union[IResolvable, InferenceSpecificationProperty]inferenceSpecificationmay be undefinedIResolvableInferenceSpecificationmay be undefinedIResolvableInferenceSpecificationmay be undefinedinterface{}#lastModifiedTimemay be undefinedstringlast_modified_timemay be undefinedstrlastModifiedTimemay be undefinedStringLastModifiedTimemay be undefinedstringLastModifiedTimemay be undefined*string#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{}#modelApprovalStatusmay be undefinedstringmodel_approval_statusmay be undefinedstrmodelApprovalStatusmay be undefinedStringModelApprovalStatusmay be undefinedstringModelApprovalStatusmay be undefined*string#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{}#modelMetricsmay be undefinedIResolvable | CfnModelPackage.ModelMetricsPropertymodel_metricsmay be undefinedtyping.Union[IResolvable, ModelMetricsProperty]modelMetricsmay be undefinedIResolvableModelMetricsmay be undefinedIResolvableModelMetricsmay be undefinedinterface{}#modelPackageDescriptionmay be undefinedstringmodel_package_descriptionmay be undefinedstrmodelPackageDescriptionmay be undefinedStringModelPackageDescriptionmay be undefinedstringModelPackageDescriptionmay be undefined*string#modelPackageGroupNamemay be undefinedstringmodel_package_group_namemay be undefinedstrmodelPackageGroupNamemay be undefinedStringModelPackageGroupNamemay be undefinedstringModelPackageGroupNamemay be undefined*string#modelPackageNamemay be undefinedstringmodel_package_namemay be undefinedstrmodelPackageNamemay be undefinedStringModelPackageNamemay be undefinedstringModelPackageNamemay be undefined*string#The name can be as follows:.
modelPackageRefModelPackageReferencemodel_package_refModelPackageReferencemodelPackageRefModelPackageReferenceModelPackageRefModelPackageReferenceModelPackageRefModelPackageReference#modelPackageStatusDetailsmay be undefinedIResolvable | CfnModelPackage.ModelPackageStatusDetailsPropertymodel_package_status_detailsmay be undefinedtyping.Union[IResolvable, ModelPackageStatusDetailsProperty]modelPackageStatusDetailsmay be undefinedIResolvableModelPackageStatusDetailsmay be undefinedIResolvableModelPackageStatusDetailsmay be undefinedinterface{}#modelPackageVersionmay be undefinednumbermodel_package_versionmay be undefinedint | floatmodelPackageVersionmay be undefinedNumberModelPackageVersionmay be undefineddoubleModelPackageVersionmay be undefined*float64#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#securityConfigmay be undefinedIResolvable | CfnModelPackage.SecurityConfigPropertysecurity_configmay be undefinedtyping.Union[IResolvable, SecurityConfigProperty]securityConfigmay be undefinedIResolvableSecurityConfigmay be undefinedIResolvableSecurityConfigmay be undefinedinterface{}#skipModelValidationmay be undefinedstringskip_model_validationmay be undefinedstrskipModelValidationmay be undefinedStringSkipModelValidationmay be undefinedstringSkipModelValidationmay be undefined*string#sourceAlgorithmSpecificationmay be undefinedIResolvable | CfnModelPackage.SourceAlgorithmSpecificationPropertysource_algorithm_specificationmay be undefinedtyping.Union[IResolvable, SourceAlgorithmSpecificationProperty]sourceAlgorithmSpecificationmay be undefinedIResolvableSourceAlgorithmSpecificationmay be undefinedIResolvableSourceAlgorithmSpecificationmay be undefinedinterface{}#sourceUrimay be undefinedstringsource_urimay be undefinedstrsourceUrimay be undefinedStringSourceUrimay be undefinedstringSourceUrimay be undefined*string#CfnElements must be defined within a stack scope (directly or indirectly).
tagsRawmay be undefinedCfnTag[]tags_rawmay be undefinedtyping.List[CfnTag]tagsRawmay be undefinedList<CfnTag>TagsRawmay be undefinedCfnTag[]TagsRawmay be undefined*[]CfnTag#taskmay be undefinedstringtaskmay be undefinedstrtaskmay be undefinedStringTaskmay be undefinedstringTaskmay be undefined*string#validationSpecificationmay be undefinedIResolvable | CfnModelPackage.ValidationSpecificationPropertyvalidation_specificationmay be undefinedtyping.Union[IResolvable, ValidationSpecificationProperty]validationSpecificationmay be undefinedIResolvableValidationSpecificationmay be undefinedIResolvableValidationSpecificationmay be undefinedinterface{}#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)#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#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#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{})#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{})#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,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"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)#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{})#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)#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)#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)#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#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{}#inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#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#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#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#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#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{}#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)#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#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)#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)#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
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#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.