@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.349Z") @Stability(value=Stable) public class CfnExperiment extends CfnResource implements IInspectable
Creates or updates an Evidently experiment . Before you create an experiment, you must create the feature to use for the experiment.
An experiment helps you make feature design decisions based on evidence and data. An experiment can test as many as five variations at once. Evidently collects experiment data and analyzes it by statistical methods, and provides clear recommendations about which variations perform better.
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.*;
CfnExperiment cfnExperiment = CfnExperiment.Builder.create(this, "MyCfnExperiment")
.metricGoals(List.of(MetricGoalObjectProperty.builder()
.desiredChange("desiredChange")
.entityIdKey("entityIdKey")
.eventPattern("eventPattern")
.metricName("metricName")
.valueKey("valueKey")
// the properties below are optional
.unitLabel("unitLabel")
.build()))
.name("name")
.onlineAbConfig(OnlineAbConfigObjectProperty.builder()
.controlTreatmentName("controlTreatmentName")
.treatmentWeights(List.of(TreatmentToWeightProperty.builder()
.splitWeight(123)
.treatment("treatment")
.build()))
.build())
.project("project")
.treatments(List.of(TreatmentObjectProperty.builder()
.feature("feature")
.treatmentName("treatmentName")
.variation("variation")
// the properties below are optional
.description("description")
.build()))
// the properties below are optional
.description("description")
.randomizationSalt("randomizationSalt")
.removeSegment(false)
.runningStatus(RunningStatusObjectProperty.builder()
.analysisCompleteTime("analysisCompleteTime")
.desiredState("desiredState")
.reason("reason")
.status("status")
.build())
.samplingRate(123)
.segment("segment")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnExperiment.Builder
A fluent builder for
CfnExperiment. |
static interface |
CfnExperiment.MetricGoalObjectProperty
Use this structure to tell Evidently whether higher or lower values are desired for a metric that is used in an experiment.
|
static interface |
CfnExperiment.OnlineAbConfigObjectProperty
A structure that contains the configuration of which variation to use as the "control" version.
|
static interface |
CfnExperiment.RunningStatusObjectProperty
Use this structure to start and stop the experiment.
|
static interface |
CfnExperiment.TreatmentObjectProperty
A structure that defines one treatment in an experiment.
|
static interface |
CfnExperiment.TreatmentToWeightProperty
This structure defines how much experiment traffic to allocate to one treatment used in the experiment.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnExperiment(software.constructs.Construct scope,
String id,
CfnExperimentProps props)
Create a new `AWS::Evidently::Experiment`.
|
protected |
CfnExperiment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnExperiment(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The ARN of the experiment.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDescription()
An optional description of the experiment.
|
Object |
getMetricGoals()
An array of structures that defines the metrics used for the experiment, and whether a higher or lower value for each metric is the goal.
|
String |
getName()
A name for the new experiment.
|
Object |
getOnlineAbConfig()
A structure that contains the configuration of which variation to use as the "control" version.
|
String |
getProject()
The name or the ARN of the project where this experiment is to be created.
|
String |
getRandomizationSalt()
When Evidently assigns a particular user session to an experiment, it must use a randomization ID to determine which variation the user session is served.
|
Object |
getRemoveSegment()
`AWS::Evidently::Experiment.RemoveSegment`.
|
Object |
getRunningStatus()
A structure that you can use to start and stop the experiment.
|
Number |
getSamplingRate()
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.
|
String |
getSegment()
`AWS::Evidently::Experiment.Segment`.
|
TagManager |
getTags()
Assigns one or more tags (key-value pairs) to the experiment.
|
Object |
getTreatments()
An array of structures that describe the configuration of each feature variation used in the experiment.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDescription(String value)
An optional description of the experiment.
|
void |
setMetricGoals(IResolvable value)
An array of structures that defines the metrics used for the experiment, and whether a higher or lower value for each metric is the goal.
|
void |
setMetricGoals(List<Object> value)
An array of structures that defines the metrics used for the experiment, and whether a higher or lower value for each metric is the goal.
|
void |
setName(String value)
A name for the new experiment.
|
void |
setOnlineAbConfig(CfnExperiment.OnlineAbConfigObjectProperty value)
A structure that contains the configuration of which variation to use as the "control" version.
|
void |
setOnlineAbConfig(IResolvable value)
A structure that contains the configuration of which variation to use as the "control" version.
|
void |
setProject(String value)
The name or the ARN of the project where this experiment is to be created.
|
void |
setRandomizationSalt(String value)
When Evidently assigns a particular user session to an experiment, it must use a randomization ID to determine which variation the user session is served.
|
void |
setRemoveSegment(Boolean value)
`AWS::Evidently::Experiment.RemoveSegment`.
|
void |
setRemoveSegment(IResolvable value)
`AWS::Evidently::Experiment.RemoveSegment`.
|
void |
setRunningStatus(CfnExperiment.RunningStatusObjectProperty value)
A structure that you can use to start and stop the experiment.
|
void |
setRunningStatus(IResolvable value)
A structure that you can use to start and stop the experiment.
|
void |
setSamplingRate(Number value)
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.
|
void |
setSegment(String value)
`AWS::Evidently::Experiment.Segment`.
|
void |
setTreatments(IResolvable value)
An array of structures that describe the configuration of each feature variation used in the experiment.
|
void |
setTreatments(List<Object> value)
An array of structures that describe the configuration of each feature variation used in the experiment.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnExperiment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnExperiment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnExperiment(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnExperimentProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
For example, arn:aws:evidently:us-west-2:0123455678912:project/myProject/experiment/myExperiment
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.
You can associate as many as 50 tags with an experiment.
For more information, see Tagging AWS resources .
@Stability(value=Stable) @NotNull public Object getMetricGoals()
You can use up to three metrics in an experiment.
@Stability(value=Stable)
public void setMetricGoals(@NotNull
IResolvable value)
You can use up to three metrics in an experiment.
@Stability(value=Stable)
public void setMetricGoals(@NotNull
List<Object> value)
You can use up to three metrics in an experiment.
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @NotNull public Object getOnlineAbConfig()
The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.
@Stability(value=Stable)
public void setOnlineAbConfig(@NotNull
CfnExperiment.OnlineAbConfigObjectProperty value)
The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.
@Stability(value=Stable)
public void setOnlineAbConfig(@NotNull
IResolvable value)
The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.
@Stability(value=Stable) @NotNull public String getProject()
@Stability(value=Stable)
public void setProject(@NotNull
String value)
@Stability(value=Stable) @NotNull public Object getTreatments()
@Stability(value=Stable)
public void setTreatments(@NotNull
IResolvable value)
@Stability(value=Stable)
public void setTreatments(@NotNull
List<Object> value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getRandomizationSalt()
This randomization ID is a combination of the entity ID and randomizationSalt . If you omit randomizationSalt , Evidently uses the experiment name as the randomizationSalt .
@Stability(value=Stable)
public void setRandomizationSalt(@Nullable
String value)
This randomization ID is a combination of the entity ID and randomizationSalt . If you omit randomizationSalt , Evidently uses the experiment name as the randomizationSalt .
@Stability(value=Stable) @Nullable public Object getRemoveSegment()
@Stability(value=Stable)
public void setRemoveSegment(@Nullable
Boolean value)
@Stability(value=Stable)
public void setRemoveSegment(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getRunningStatus()
@Stability(value=Stable)
public void setRunningStatus(@Nullable
CfnExperiment.RunningStatusObjectProperty value)
@Stability(value=Stable)
public void setRunningStatus(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Number getSamplingRate()
The available audience is the total audience minus the audience that you have allocated to overrides or current launches of this feature.
This is represented in thousandths of a percent. For example, specify 10,000 to allocate 10% of the available audience.
@Stability(value=Stable)
public void setSamplingRate(@Nullable
Number value)
The available audience is the total audience minus the audience that you have allocated to overrides or current launches of this feature.
This is represented in thousandths of a percent. For example, specify 10,000 to allocate 10% of the available audience.
@Stability(value=Stable) @Nullable public String getSegment()
@Stability(value=Stable)
public void setSegment(@Nullable
String value)
Copyright © 2022. All rights reserved.