# InferenceSpecificationProperty

Defines how to perform inference generation after a training job is run.

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## 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 inferenceSpecificationProperty: sagemaker.CfnModelPackage.InferenceSpecificationProperty = {
  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'],
};
```

## Properties

- `containers`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnModelPackage.ModelPackageContainerDefinitionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnModelPackage.ModelPackageContainerDefinitionProperty.html)[] (required) — The Amazon ECR registry path of the Docker image that contains the inference code.

- `supportedContentTypes`: string[] (required) — The supported MIME types for the input data.

- `supportedRealtimeInferenceInstanceTypes`: string[] — A list of the instance types that are used to generate inferences in real-time.

  This parameter is required for unversioned models, and optional for versioned models.

- `supportedResponseMimeTypes`: string[] (required) — The supported MIME types for the output data.

- `supportedTransformInstanceTypes`: string[] — A list of the instance types on which a transformation job can be run or on which an endpoint can be deployed.

  This parameter is required for unversioned models, and optional for versioned models.
