Class CfnInferenceExperimentPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.sagemaker.CfnInferenceExperimentPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:20:04.997Z") @Stability(Stable) public class CfnInferenceExperimentPropsMixin extends Mixin implements software.constructs.IMixin
Creates an inference experiment using the configurations specified in the request.

Use this API to setup and schedule an experiment to compare model variants on a Amazon SageMaker inference endpoint. For more information about inference experiments, see Shadow tests .

Amazon SageMaker begins your experiment at the scheduled time and routes traffic to your endpoint's model variants based on your specified configuration.

While the experiment is in progress or after it has concluded, you can view metrics that compare your model variants. For more information, see View, monitor, and edit shadow tests .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.sagemaker.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnInferenceExperimentPropsMixin cfnInferenceExperimentPropsMixin = CfnInferenceExperimentPropsMixin.Builder.create(CfnInferenceExperimentMixinProps.builder()
         .dataStorageConfig(DataStorageConfigProperty.builder()
                 .contentType(CaptureContentTypeHeaderProperty.builder()
                         .csvContentTypes(List.of("csvContentTypes"))
                         .jsonContentTypes(List.of("jsonContentTypes"))
                         .build())
                 .destination("destination")
                 .kmsKey("kmsKey")
                 .build())
         .description("description")
         .desiredState("desiredState")
         .endpointName("endpointName")
         .kmsKey("kmsKey")
         .modelVariants(List.of(ModelVariantConfigProperty.builder()
                 .infrastructureConfig(ModelInfrastructureConfigProperty.builder()
                         .infrastructureType("infrastructureType")
                         .realTimeInferenceConfig(RealTimeInferenceConfigProperty.builder()
                                 .instanceCount(123)
                                 .instanceType("instanceType")
                                 .build())
                         .build())
                 .modelName("modelName")
                 .variantName("variantName")
                 .build()))
         .name("name")
         .roleArn("roleArn")
         .schedule(InferenceExperimentScheduleProperty.builder()
                 .endTime("endTime")
                 .startTime("startTime")
                 .build())
         .shadowModeConfig(ShadowModeConfigProperty.builder()
                 .shadowModelVariants(List.of(ShadowModelVariantConfigProperty.builder()
                         .samplingPercentage(123)
                         .shadowModelVariantName("shadowModelVariantName")
                         .build()))
                 .sourceModelVariantName("sourceModelVariantName")
                 .build())
         .statusReason("statusReason")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .type("type")
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnInferenceExperimentPropsMixin

      protected CfnInferenceExperimentPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnInferenceExperimentPropsMixin

      protected CfnInferenceExperimentPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnInferenceExperimentPropsMixin

      @Stability(Stable) public CfnInferenceExperimentPropsMixin(@NotNull CfnInferenceExperimentMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::SageMaker::InferenceExperiment.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnInferenceExperimentPropsMixin

      @Stability(Stable) public CfnInferenceExperimentPropsMixin(@NotNull CfnInferenceExperimentMixinProps props)
      Create a mixin to apply properties to AWS::SageMaker::InferenceExperiment.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnInferenceExperimentMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()