Class CfnFeature

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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.314Z") @Stability(Stable) public class CfnFeature extends CfnResource implements IInspectable, ITaggable
Creates or updates an Evidently feature that you want to launch or test.

You can define up to five variations of a feature, and use these variations in your launches and experiments. A feature must be created in a project. For information about creating a project, see CreateProject .

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.evidently.*;
 CfnFeature cfnFeature = CfnFeature.Builder.create(this, "MyCfnFeature")
         .name("name")
         .project("project")
         .variations(List.of(VariationObjectProperty.builder()
                 .variationName("variationName")
                 // the properties below are optional
                 .booleanValue(false)
                 .doubleValue(123)
                 .longValue(123)
                 .stringValue("stringValue")
                 .build()))
         // the properties below are optional
         .defaultVariation("defaultVariation")
         .description("description")
         .entityOverrides(List.of(EntityOverrideProperty.builder()
                 .entityId("entityId")
                 .variation("variation")
                 .build()))
         .evaluationStrategy("evaluationStrategy")
         .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

    • CfnFeature

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

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

      @Stability(Stable) public CfnFeature(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnFeatureProps props)
      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

    • 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 ARN of the feature.

      For example, arn:aws:evidently:us-west-2:0123455678912:project/myProject/feature/myFeature .

    • getCfnProperties

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

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

      @Stability(Stable) @NotNull public String getName()
      The name for the feature.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name for the feature.
    • getProject

      @Stability(Stable) @NotNull public String getProject()
      The name or ARN of the project that is to contain the new feature.
    • setProject

      @Stability(Stable) public void setProject(@NotNull String value)
      The name or ARN of the project that is to contain the new feature.
    • getVariations

      @Stability(Stable) @NotNull public Object getVariations()
      An array of structures that contain the configuration of the feature's different variations.
    • setVariations

      @Stability(Stable) public void setVariations(@NotNull IResolvable value)
      An array of structures that contain the configuration of the feature's different variations.
    • setVariations

      @Stability(Stable) public void setVariations(@NotNull List<Object> value)
      An array of structures that contain the configuration of the feature's different variations.
    • getDefaultVariation

      @Stability(Stable) @Nullable public String getDefaultVariation()
      The name of the variation to use as the default variation.
    • setDefaultVariation

      @Stability(Stable) public void setDefaultVariation(@Nullable String value)
      The name of the variation to use as the default variation.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      An optional description of the feature.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      An optional description of the feature.
    • getEntityOverrides

      @Stability(Stable) @Nullable public Object getEntityOverrides()
      Specify users that should always be served a specific variation of a feature.
    • setEntityOverrides

      @Stability(Stable) public void setEntityOverrides(@Nullable IResolvable value)
      Specify users that should always be served a specific variation of a feature.
    • setEntityOverrides

      @Stability(Stable) public void setEntityOverrides(@Nullable List<Object> value)
      Specify users that should always be served a specific variation of a feature.
    • getEvaluationStrategy

      @Stability(Stable) @Nullable public String getEvaluationStrategy()
      Specify ALL_RULES to activate the traffic allocation specified by any ongoing launches or experiments.
    • setEvaluationStrategy

      @Stability(Stable) public void setEvaluationStrategy(@Nullable String value)
      Specify ALL_RULES to activate the traffic allocation specified by any ongoing launches or experiments.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Assigns one or more tags (key-value pairs) to the feature.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Assigns one or more tags (key-value pairs) to the feature.