Class CfnExperimentDefinition

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.appconfig.CfnExperimentDefinition
All Implemented Interfaces:
IInspectable, IExperimentDefinitionRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:02.582Z") @Stability(Stable) public class CfnExperimentDefinition extends CfnResource implements IInspectable, IExperimentDefinitionRef, ITaggableV2
Resource Type definition for AWS::AppConfig::ExperimentDefinition.

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.appconfig.*;
 CfnExperimentDefinition cfnExperimentDefinition = CfnExperimentDefinition.Builder.create(this, "MyCfnExperimentDefinition")
         .applicationIdentifier("applicationIdentifier")
         .audienceRule("audienceRule")
         .configurationProfileIdentifier("configurationProfileIdentifier")
         .control(TreatmentProperty.builder()
                 .enabled(false)
                 .weight(123)
                 // the properties below are optional
                 .attributeValues(Map.of(
                         "attributeValuesKey", AttributeValueProperty.builder()
                                 .booleanValue(false)
                                 .numberArray(List.of(123))
                                 .numberValue(123)
                                 .stringArray(List.of("stringArray"))
                                 .stringValue("stringValue")
                                 .build()))
                 .description("description")
                 .key("key")
                 .build())
         .environmentIdentifier("environmentIdentifier")
         .flagKey("flagKey")
         .name("name")
         .treatments(List.of(TreatmentProperty.builder()
                 .enabled(false)
                 .weight(123)
                 // the properties below are optional
                 .attributeValues(Map.of(
                         "attributeValuesKey", AttributeValueProperty.builder()
                                 .booleanValue(false)
                                 .numberArray(List.of(123))
                                 .numberValue(123)
                                 .stringArray(List.of("stringArray"))
                                 .stringValue("stringValue")
                                 .build()))
                 .description("description")
                 .key("key")
                 .build()))
         // the properties below are optional
         .audienceDescription("audienceDescription")
         .hypothesis("hypothesis")
         .launchCriteria("launchCriteria")
         .tags(List.of(CfnTag.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

    • CfnExperimentDefinition

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

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

      @Stability(Stable) public CfnExperimentDefinition(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnExperimentDefinitionProps props)
      Create a new AWS::AppConfig::ExperimentDefinition.

      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

    • isCfnExperimentDefinition

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

      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.
    • getAttrApplicationId

      @Stability(Stable) @NotNull public String getAttrApplicationId()
      The resolved application ID (read-only, assigned by service).
    • getAttrControlKey

      @Stability(Stable) @NotNull public String getAttrControlKey()
      The treatment key (read-only, auto-generated by service).
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      ISO-8601 creation timestamp.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The experiment definition ID.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      Current status.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      ISO-8601 last update timestamp.
    • 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
    • getExperimentDefinitionRef

      @Stability(Stable) @NotNull public ExperimentDefinitionReference getExperimentDefinitionRef()
      A reference to a ExperimentDefinition resource.
      Specified by:
      getExperimentDefinitionRef in interface IExperimentDefinitionRef
    • getApplicationIdentifier

      @Stability(Stable) @NotNull public String getApplicationIdentifier()
      The application ID, name, or ARN.
    • setApplicationIdentifier

      @Stability(Stable) public void setApplicationIdentifier(@NotNull String value)
      The application ID, name, or ARN.
    • getAudienceRule

      @Stability(Stable) @NotNull public String getAudienceRule()
      Rule expression defining the experiment audience.
    • setAudienceRule

      @Stability(Stable) public void setAudienceRule(@NotNull String value)
      Rule expression defining the experiment audience.
    • getConfigurationProfileIdentifier

      @Stability(Stable) @NotNull public String getConfigurationProfileIdentifier()
      The configuration profile ID, name, or ARN.
    • setConfigurationProfileIdentifier

      @Stability(Stable) public void setConfigurationProfileIdentifier(@NotNull String value)
      The configuration profile ID, name, or ARN.
    • getControl

      @Stability(Stable) @NotNull public Object getControl()
      A treatment variant with weight and flag value.

      Returns union: either IResolvable or CfnExperimentDefinition.TreatmentProperty

    • setControl

      @Stability(Stable) public void setControl(@NotNull IResolvable value)
      A treatment variant with weight and flag value.
    • setControl

      @Stability(Stable) public void setControl(@NotNull CfnExperimentDefinition.TreatmentProperty value)
      A treatment variant with weight and flag value.
    • getEnvironmentIdentifier

      @Stability(Stable) @NotNull public String getEnvironmentIdentifier()
      The environment ID, name, or ARN.
    • setEnvironmentIdentifier

      @Stability(Stable) public void setEnvironmentIdentifier(@NotNull String value)
      The environment ID, name, or ARN.
    • getFlagKey

      @Stability(Stable) @NotNull public String getFlagKey()
      The key of the existing flag in the configuration profile to experiment on.
    • setFlagKey

      @Stability(Stable) public void setFlagKey(@NotNull String value)
      The key of the existing flag in the configuration profile to experiment on.
    • getName

      @Stability(Stable) @NotNull public String getName()
      A name for the experiment definition.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      A name for the experiment definition.
    • getTreatments

      @Stability(Stable) @NotNull public Object getTreatments()
      Treatment variants (1-5).

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnExperimentDefinition.TreatmentProperty>

    • setTreatments

      @Stability(Stable) public void setTreatments(@NotNull IResolvable value)
      Treatment variants (1-5).
    • setTreatments

      @Stability(Stable) public void setTreatments(@NotNull List<Object> value)
      Treatment variants (1-5).
    • getAudienceDescription

      @Stability(Stable) @Nullable public String getAudienceDescription()
      Human-readable description of the audience.
    • setAudienceDescription

      @Stability(Stable) public void setAudienceDescription(@Nullable String value)
      Human-readable description of the audience.
    • getHypothesis

      @Stability(Stable) @Nullable public String getHypothesis()
      The hypothesis of the experiment.
    • setHypothesis

      @Stability(Stable) public void setHypothesis(@Nullable String value)
      The hypothesis of the experiment.
    • getLaunchCriteria

      @Stability(Stable) @Nullable public String getLaunchCriteria()
      Criteria for launching the experiment.
    • setLaunchCriteria

      @Stability(Stable) public void setLaunchCriteria(@Nullable String value)
      Criteria for launching the experiment.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Tags to associate with the experiment definition.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Tags to associate with the experiment definition.