Class CfnExperiment

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, IExperimentRef, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:51:11.298Z") @Stability(Stable) public class CfnExperiment extends CfnResource implements IInspectable, IExperimentRef, ITaggableV2
Resource type definition for AWS::SageMaker::Experiment.

An experiment is a collection of related trials used to organize and track machine learning workflows.

Example:

 // 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.*;
 CfnExperiment cfnExperiment = CfnExperiment.Builder.create(this, "MyCfnExperiment")
         .experimentName("experimentName")
         // the properties below are optional
         .description("description")
         .displayName("displayName")
         .tags(List.of(TagsItemsProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnExperiment

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

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

      @Stability(Stable) public CfnExperiment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnExperimentProps props)
      Create a new AWS::SageMaker::Experiment.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForExperiment

      @Stability(Stable) @NotNull public static String arnForExperiment(@NotNull IExperimentRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnExperiment

      @Stability(Stable) @NotNull public static Boolean isCfnExperiment(@NotNull Object x)
      Checks whether the given object is a CfnExperiment.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the experiment.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      When the experiment was created.
    • getAttrLastModifiedTime

      @Stability(Stable) @NotNull public String getAttrLastModifiedTime()
      When the experiment was last modified.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getExperimentRef

      @Stability(Stable) @NotNull public ExperimentReference getExperimentRef()
      A reference to a Experiment resource.
      Specified by:
      getExperimentRef in interface IExperimentRef
    • getExperimentName

      @Stability(Stable) @NotNull public String getExperimentName()
      The name of the experiment.
    • setExperimentName

      @Stability(Stable) public void setExperimentName(@NotNull String value)
      The name of the experiment.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the experiment.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the experiment.
    • getDisplayName

      @Stability(Stable) @Nullable public String getDisplayName()
      The name of the experiment as displayed.
    • setDisplayName

      @Stability(Stable) public void setDisplayName(@Nullable String value)
      The name of the experiment as displayed.
    • getTags

      @Stability(Stable) @Nullable public List<CfnExperiment.TagsItemsProperty> getTags()
      A list of tags to associate with the experiment.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnExperiment.TagsItemsProperty> value)
      A list of tags to associate with the experiment.