# ModelPackageContainerDefinitionProperty

- Source: Generated at build time
- Type last changed: v2.262.0 · 22 Jul 2026

## Example

TypeScript:

```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';
const modelPackageContainerDefinitionProperty: sagemaker.CfnAlgorithm.ModelPackageContainerDefinitionProperty = {
  image: 'image',

  // the properties below are optional
  containerHostname: 'containerHostname',
  environment: {
    environmentKey: 'environment',
  },
  framework: 'framework',
  frameworkVersion: 'frameworkVersion',
  imageDigest: 'imageDigest',
  isCheckpoint: false,
  modelInput: {
    dataInputConfig: 'dataInputConfig',
  },
  nearestModelName: 'nearestModelName',
};
```

Python:

```python
# 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_package_container_definition_property = sagemaker.CfnAlgorithm.ModelPackageContainerDefinitionProperty(
    image="image",

    # the properties below are optional
    container_hostname="containerHostname",
    environment={
        "environment_key": "environment"
    },
    framework="framework",
    framework_version="frameworkVersion",
    image_digest="imageDigest",
    is_checkpoint=False,
    model_input=sagemaker.CfnAlgorithm.ModelInputProperty(
        data_input_config="dataInputConfig"
    ),
    nearest_model_name="nearestModelName"
)
```

Java:

```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.*;

ModelPackageContainerDefinitionProperty modelPackageContainerDefinitionProperty = ModelPackageContainerDefinitionProperty.builder()
        .image("image")

        // the properties below are optional
        .containerHostname("containerHostname")
        .environment(Map.of(
                "environmentKey", "environment"))
        .framework("framework")
        .frameworkVersion("frameworkVersion")
        .imageDigest("imageDigest")
        .isCheckpoint(false)
        .modelInput(ModelInputProperty.builder()
                .dataInputConfig("dataInputConfig")
                .build())
        .nearestModelName("nearestModelName")
        .build();
```

C# / .NET:

```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 modelPackageContainerDefinitionProperty = new ModelPackageContainerDefinitionProperty {
    Image = "image",

    // the properties below are optional
    ContainerHostname = "containerHostname",
    Environment = new Dictionary<string, string> {
        { "environmentKey", "environment" }
    },
    Framework = "framework",
    FrameworkVersion = "frameworkVersion",
    ImageDigest = "imageDigest",
    IsCheckpoint = false,
    ModelInput = new ModelInputProperty {
        DataInputConfig = "dataInputConfig"
    },
    NearestModelName = "nearestModelName"
};
```

Golang:

```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"

modelPackageContainerDefinitionProperty := &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"),
	IsCheckpoint: jsii.Boolean(false),
	ModelInput: &ModelInputProperty{
		DataInputConfig: jsii.String("dataInputConfig"),
	},
	NearestModelName: jsii.String("nearestModelName"),
}
```

## Properties

- `containerHostname`: string

- `environment`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string }

- `framework`: string

- `frameworkVersion`: string

- `image`: string (required)

- `imageDigest`: string

- `isCheckpoint`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `modelInput`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlgorithm.ModelInputProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnAlgorithm.ModelInputProperty.html)

- `nearestModelName`: string
