Class CfnExperiment
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Evidently::Experiment.
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnExperiment.static interfaceUse this structure to tell Evidently whether higher or lower values are desired for a metric that is used in an experiment.static interfaceA structure that contains the configuration of which variation to use as the "control" version.static interfaceUse this structure to start and stop the experiment.static interfaceA structure that defines one treatment in an experiment.static interfaceThis structure defines how much experiment traffic to allocate to one treatment used in the experiment.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnExperiment(Construct scope, String id, CfnExperimentProps props) Create a newAWS::Evidently::Experiment.protectedCfnExperiment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnExperiment(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe ARN of the experiment.An optional description of the experiment.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.getName()A name for the new experiment.A structure that contains the configuration of which variation to use as the "control" version.The name or the ARN of the project where this experiment is to be created.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.Set this totrueto remove the segment that is associated with this experiment.A structure that you can use to start and stop the experiment.The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.Specifies an audience segment to use in the experiment.getTags()Assigns one or more tags (key-value pairs) to the experiment.An array of structures that describe the configuration of each feature variation used in the experiment.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) An optional description of the experiment.voidsetMetricGoals(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.voidsetMetricGoals(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.voidA name for the new experiment.voidsetOnlineAbConfig(IResolvable value) A structure that contains the configuration of which variation to use as the "control" version.voidA structure that contains the configuration of which variation to use as the "control" version.voidsetProject(String value) The name or the ARN of the project where this experiment is to be created.voidsetRandomizationSalt(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.voidsetRemoveSegment(Boolean value) Set this totrueto remove the segment that is associated with this experiment.voidsetRemoveSegment(IResolvable value) Set this totrueto remove the segment that is associated with this experiment.voidsetRunningStatus(IResolvable value) A structure that you can use to start and stop the experiment.voidA structure that you can use to start and stop the experiment.voidsetSamplingRate(Number value) The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.voidsetSegment(String value) Specifies an audience segment to use in the experiment.voidsetTreatments(List<Object> value) An array of structures that describe the configuration of each feature variation used in the experiment.voidsetTreatments(IResolvable value) An array of structures that describe the configuration of each feature variation used in the experiment.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 Construct scope, @NotNull String id, @NotNull CfnExperimentProps props) Create a newAWS::Evidently::Experiment.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The ARN of the experiment.For example,
arn:aws:evidently:us-west-2:0123455678912:project/myProject/experiment/myExperiment -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Assigns one or more tags (key-value pairs) to the experiment.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 .
-
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.You can use up to three metrics in an experiment.
-
setMetricGoals
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.You can use up to three metrics in an experiment.
-
setMetricGoals
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.You can use up to three metrics in an experiment.
-
getName
A name for the new experiment. -
setName
A name for the new experiment. -
getOnlineAbConfig
A structure that contains the configuration of which variation to use as the "control" version.The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.
-
setOnlineAbConfig
A structure that contains the configuration of which variation to use as the "control" version.The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.
-
setOnlineAbConfig
@Stability(Stable) public void setOnlineAbConfig(@NotNull CfnExperiment.OnlineAbConfigObjectProperty value) A structure that contains the configuration of which variation to use as the "control" version.The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.
-
getProject
The name or the ARN of the project where this experiment is to be created. -
setProject
The name or the ARN of the project where this experiment is to be created. -
getTreatments
An array of structures that describe the configuration of each feature variation used in the experiment. -
setTreatments
An array of structures that describe the configuration of each feature variation used in the experiment. -
setTreatments
An array of structures that describe the configuration of each feature variation used in the experiment. -
getDescription
An optional description of the experiment. -
setDescription
An optional description of the experiment. -
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.This randomization ID is a combination of the entity ID and
randomizationSalt. If you omitrandomizationSalt, Evidently uses the experiment name as therandomizationSalt. -
setRandomizationSalt
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.This randomization ID is a combination of the entity ID and
randomizationSalt. If you omitrandomizationSalt, Evidently uses the experiment name as therandomizationSalt. -
getRemoveSegment
Set this totrueto remove the segment that is associated with this experiment.You can't use this parameter if the experiment is currently running.
-
setRemoveSegment
Set this totrueto remove the segment that is associated with this experiment.You can't use this parameter if the experiment is currently running.
-
setRemoveSegment
Set this totrueto remove the segment that is associated with this experiment.You can't use this parameter if the experiment is currently running.
-
getRunningStatus
A structure that you can use to start and stop the experiment. -
setRunningStatus
A structure that you can use to start and stop the experiment. -
setRunningStatus
@Stability(Stable) public void setRunningStatus(@Nullable CfnExperiment.RunningStatusObjectProperty value) A structure that you can use to start and stop the experiment. -
getSamplingRate
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.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.
-
setSamplingRate
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.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.
-
getSegment
Specifies an audience segment to use in the experiment.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 .
-
setSegment
Specifies an audience segment to use in the experiment.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 .
-