# ShadowModeConfigProperty

The configuration of `ShadowMode` inference experiment type, which specifies a production variant to take all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests.

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

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## 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 shadowModeConfigProperty: sagemaker.CfnInferenceExperiment.ShadowModeConfigProperty = {
  shadowModelVariants: [{
    samplingPercentage: 123,
    shadowModelVariantName: 'shadowModelVariantName',
  }],
  sourceModelVariantName: 'sourceModelVariantName',
};
```

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

shadow_mode_config_property = sagemaker.CfnInferenceExperiment.ShadowModeConfigProperty(
    shadow_model_variants=[sagemaker.CfnInferenceExperiment.ShadowModelVariantConfigProperty(
        sampling_percentage=123,
        shadow_model_variant_name="shadowModelVariantName"
    )],
    source_model_variant_name="sourceModelVariantName"
)
```

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

ShadowModeConfigProperty shadowModeConfigProperty = ShadowModeConfigProperty.builder()
        .shadowModelVariants(List.of(ShadowModelVariantConfigProperty.builder()
                .samplingPercentage(123)
                .shadowModelVariantName("shadowModelVariantName")
                .build()))
        .sourceModelVariantName("sourceModelVariantName")
        .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 shadowModeConfigProperty = new ShadowModeConfigProperty {
    ShadowModelVariants = new [] { new ShadowModelVariantConfigProperty {
        SamplingPercentage = 123,
        ShadowModelVariantName = "shadowModelVariantName"
    } },
    SourceModelVariantName = "sourceModelVariantName"
};
```

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"

shadowModeConfigProperty := &ShadowModeConfigProperty{
	ShadowModelVariants: []interface{}{
		&ShadowModelVariantConfigProperty{
			SamplingPercentage: jsii.Number(123),
			ShadowModelVariantName: jsii.String("shadowModelVariantName"),
		},
	},
	SourceModelVariantName: jsii.String("sourceModelVariantName"),
}
```

## Properties

- `shadowModelVariants`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceExperiment.ShadowModelVariantConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceExperiment.ShadowModelVariantConfigProperty.html)[] (required) — List of shadow variant configurations.

- `sourceModelVariantName`: string (required) — The name of the production variant, which takes all the inference requests.
