# CfnInferenceExperimentProps

Properties for defining a `CfnInferenceExperiment`.

- Source: Generated code
- Type last changed: v2.70.0 · 22 Mar 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';
const cfnInferenceExperimentProps: sagemaker.CfnInferenceExperimentProps = {
  endpointName: 'endpointName',
  modelVariants: [{
    infrastructureConfig: {
      infrastructureType: 'infrastructureType',
      realTimeInferenceConfig: {
        instanceCount: 123,
        instanceType: 'instanceType',
      },
    },
    modelName: 'modelName',
    variantName: 'variantName',
  }],
  name: 'name',
  roleArn: 'roleArn',
  type: 'type',

  // the properties below are optional
  dataStorageConfig: {
    destination: 'destination',

    // the properties below are optional
    contentType: {
      csvContentTypes: ['csvContentTypes'],
      jsonContentTypes: ['jsonContentTypes'],
    },
    kmsKey: 'kmsKey',
  },
  description: 'description',
  desiredState: 'desiredState',
  kmsKey: 'kmsKey',
  schedule: {
    endTime: 'endTime',
    startTime: 'startTime',
  },
  shadowModeConfig: {
    shadowModelVariants: [{
      samplingPercentage: 123,
      shadowModelVariantName: 'shadowModelVariantName',
    }],
    sourceModelVariantName: 'sourceModelVariantName',
  },
  statusReason: 'statusReason',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `dataStorageConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceExperiment.DataStorageConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceExperiment.DataStorageConfigProperty.html) — The Amazon S3 location and configuration for storing inference request and response data.

- `description`: string — The description of the inference experiment.

- `desiredState`: string — The desired state of the experiment after stopping. The possible states are the following:.

  - `Completed` : The experiment completed successfully
  - `Cancelled` : The experiment was canceled

- `endpointName`: string (required) — The name of the endpoint.

- `kmsKey`: string — The AWS Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption.

- `modelVariants`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceExperiment.ModelVariantConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceExperiment.ModelVariantConfigProperty.html)[] (required) — An array of `ModelVariantConfigSummary` objects.

  There is one for each variant in the inference experiment. Each `ModelVariantConfigSummary` object in the array describes the infrastructure configuration for deploying the corresponding variant.

- `name`: string (required) — The name of the inference experiment.

- `roleArn`: string (required) — The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.

- `schedule`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceExperiment.InferenceExperimentScheduleProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceExperiment.InferenceExperimentScheduleProperty.html) — The duration for which the inference experiment ran or will run.

  The maximum duration that you can set for an inference experiment is 30 days.

- `shadowModeConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceExperiment.ShadowModeConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceExperiment.ShadowModeConfigProperty.html) — The configuration of `ShadowMode` inference experiment type, which shows the production variant that takes all the inference requests, and the shadow variant to which Amazon SageMaker replicates a percentage of the inference requests.

  For the shadow variant it also shows the percentage of requests that Amazon SageMaker replicates.

- `statusReason`: string — The error message for the inference experiment status result.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

  For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .

- `type`: string (required) — The type of the inference experiment.

## Used as props by

- [`CfnInferenceExperiment`](/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceExperiment)
