> **Experimental**
>
> `@aws-cdk/aws-sagemaker-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# ContainerDefinition

Describes the container, as part of model definition.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/model.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-sagemaker-alpha/lib/model.ts#L116)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as sagemaker_alpha from '@aws-cdk/aws-sagemaker-alpha';

declare const containerImage: sagemaker_alpha.ContainerImage;
declare const modelData: sagemaker_alpha.ModelData;
const containerDefinition: sagemaker_alpha.ContainerDefinition = {
  image: containerImage,

  // the properties below are optional
  containerHostname: 'containerHostname',
  environment: {
    environmentKey: 'environment',
  },
  modelData: modelData,
};
```

## Properties

- `containerHostname`: string — Hostname of the container within an inference pipeline.

  **Default:** Amazon SageMaker will automatically assign a unique name based on the position of this ContainerDefinition in an inference pipeline.

  For single container models, this field
  is ignored. When specifying a hostname for one ContainerDefinition in a pipeline, hostnames
  must be specified for all other ContainerDefinitions in that pipeline.

- `environment`: { [key: string]: string } = none — A map of environment variables to pass into the container.

- `image`: [ContainerImage](/cdk/api/v2/docs/@aws-cdk_aws-sagemaker-alpha.ContainerImage.html) (required) — The image used to start a container.

- `modelData`: [ModelData](/cdk/api/v2/docs/@aws-cdk_aws-sagemaker-alpha.ModelData.html) = none — S3 path to the model artifacts.
