@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:36.138Z") 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") .metricName("metricName") .valueKey("valueKey") // the properties below are optional .eventPattern("eventPattern") .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() .status("status") // the properties below are optional .analysisCompleteTime("analysisCompleteTime") .desiredState("desiredState") .reason("reason") .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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnExperiment(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getAttrArn()
The ARN of the experiment.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
An optional description of the experiment.
|
java.lang.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.
|
java.lang.String |
getName()
A name for the new experiment.
|
java.lang.Object |
getOnlineAbConfig()
A structure that contains the configuration of which variation to use as the "control" version.
|
java.lang.String |
getProject()
The name or the ARN of the project where this experiment is to be created.
|
java.lang.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.
|
java.lang.Object |
getRemoveSegment()
Set this to `true` to remove the segment that is associated with this experiment.
|
java.lang.Object |
getRunningStatus()
A structure that you can use to start and stop the experiment.
|
java.lang.Number |
getSamplingRate()
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.
|
java.lang.String |
getSegment()
Specifies an audience *segment* to use in the experiment.
|
TagManager |
getTags()
Assigns one or more tags (key-value pairs) to the experiment.
|
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDescription(java.lang.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(java.util.List<java.lang.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(java.lang.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(java.lang.String value)
The name or the ARN of the project where this experiment is to be created.
|
void |
setRandomizationSalt(java.lang.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(java.lang.Boolean value)
Set this to `true` to remove the segment that is associated with this experiment.
|
void |
setRemoveSegment(IResolvable value)
Set this to `true` to remove the segment that is associated with this experiment.
|
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(java.lang.Number value)
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.
|
void |
setSegment(java.lang.String value)
Specifies an audience *segment* to use in the experiment.
|
void |
setTreatments(IResolvable value)
An array of structures that describe the configuration of each feature variation used in the experiment.
|
void |
setTreatments(java.util.List<java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnExperiment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnExperiment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnExperiment(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
For example, arn:aws:evidently:us-west-2:0123455678912:project/myProject/experiment/myExperiment
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
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 .
public java.lang.Object getMetricGoals()
You can use up to three metrics in an experiment.
public void setMetricGoals(IResolvable value)
You can use up to three metrics in an experiment.
public void setMetricGoals(java.util.List<java.lang.Object> value)
You can use up to three metrics in an experiment.
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.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.
public void setOnlineAbConfig(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.
public void setOnlineAbConfig(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.
public java.lang.String getProject()
public void setProject(java.lang.String value)
public java.lang.Object getTreatments()
public void setTreatments(IResolvable value)
public void setTreatments(java.util.List<java.lang.Object> value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.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
.
public void setRandomizationSalt(java.lang.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
.
public java.lang.Object getRemoveSegment()
You can't use this parameter if the experiment is currently running.
public void setRemoveSegment(java.lang.Boolean value)
You can't use this parameter if the experiment is currently running.
public void setRemoveSegment(IResolvable value)
You can't use this parameter if the experiment is currently running.
public java.lang.Object getRunningStatus()
public void setRunningStatus(IResolvable value)
public void setRunningStatus(CfnExperiment.RunningStatusObjectProperty value)
public java.lang.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.
public void setSamplingRate(java.lang.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.
public java.lang.String getSegment()
When a segment is used in an experiment, only user sessions that match the segment pattern are used in the experiment.
For more information, see Segment rule pattern syntax .
public void setSegment(java.lang.String value)
When a segment is used in an experiment, only user sessions that match the segment pattern are used in the experiment.
For more information, see Segment rule pattern syntax .