CfnExperimentPropsMixin
- class aws_cdk.mixins_preview.aws_evidently.mixins.CfnExperimentPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-experiment.html
- CloudformationResource:
AWS::Evidently::Experiment
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins cfn_experiment_props_mixin = evidently_mixins.CfnExperimentPropsMixin(evidently_mixins.CfnExperimentMixinProps( description="description", metric_goals=[evidently_mixins.CfnExperimentPropsMixin.MetricGoalObjectProperty( desired_change="desiredChange", entity_id_key="entityIdKey", event_pattern="eventPattern", metric_name="metricName", unit_label="unitLabel", value_key="valueKey" )], name="name", online_ab_config=evidently_mixins.CfnExperimentPropsMixin.OnlineAbConfigObjectProperty( control_treatment_name="controlTreatmentName", treatment_weights=[evidently_mixins.CfnExperimentPropsMixin.TreatmentToWeightProperty( split_weight=123, treatment="treatment" )] ), project="project", randomization_salt="randomizationSalt", remove_segment=False, running_status=evidently_mixins.CfnExperimentPropsMixin.RunningStatusObjectProperty( analysis_complete_time="analysisCompleteTime", desired_state="desiredState", reason="reason", status="status" ), sampling_rate=123, segment="segment", tags=[CfnTag( key="key", value="value" )], treatments=[evidently_mixins.CfnExperimentPropsMixin.TreatmentObjectProperty( description="description", feature="feature", treatment_name="treatmentName", variation="variation" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Evidently::Experiment.- Parameters:
props (
Union[CfnExperimentMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['description', 'metricGoals', 'name', 'onlineAbConfig', 'project', 'randomizationSalt', 'removeSegment', 'runningStatus', 'samplingRate', 'segment', 'tags', 'treatments']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
MetricGoalObjectProperty
- class CfnExperimentPropsMixin.MetricGoalObjectProperty(*, desired_change=None, entity_id_key=None, event_pattern=None, metric_name=None, unit_label=None, value_key=None)
Bases:
objectUse this structure to tell Evidently whether higher or lower values are desired for a metric that is used in an experiment.
- Parameters:
desired_change (
Optional[str]) –INCREASEmeans that a variation with a higher number for this metric is performing better.DECREASEmeans that a variation with a lower number for this metric is performing better.entity_id_key (
Optional[str]) – The entity, such as a user or session, that does an action that causes a metric value to be recorded. An example isuserDetails.userID.event_pattern (
Optional[str]) – The EventBridge event pattern that defines how the metric is recorded. For more information about EventBridge event patterns, see Amazon EventBridge event patterns .metric_name (
Optional[str]) – A name for the metric. It can include up to 255 characters.unit_label (
Optional[str]) – A label for the units that the metric is measuring.value_key (
Optional[str]) – The JSON path to reference the numerical metric value in the event.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins metric_goal_object_property = evidently_mixins.CfnExperimentPropsMixin.MetricGoalObjectProperty( desired_change="desiredChange", entity_id_key="entityIdKey", event_pattern="eventPattern", metric_name="metricName", unit_label="unitLabel", value_key="valueKey" )
Attributes
- desired_change
INCREASEmeans that a variation with a higher number for this metric is performing better.DECREASEmeans that a variation with a lower number for this metric is performing better.
- entity_id_key
The entity, such as a user or session, that does an action that causes a metric value to be recorded.
An example is
userDetails.userID.
- event_pattern
The EventBridge event pattern that defines how the metric is recorded.
For more information about EventBridge event patterns, see Amazon EventBridge event patterns .
- metric_name
A name for the metric.
It can include up to 255 characters.
- unit_label
A label for the units that the metric is measuring.
- value_key
The JSON path to reference the numerical metric value in the event.
OnlineAbConfigObjectProperty
- class CfnExperimentPropsMixin.OnlineAbConfigObjectProperty(*, control_treatment_name=None, treatment_weights=None)
Bases:
objectA 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.
- Parameters:
control_treatment_name (
Optional[str]) – The name of the variation that is to be the default variation that the other variations are compared to.treatment_weights (
Union[IResolvable,Sequence[Union[IResolvable,TreatmentToWeightProperty,Dict[str,Any]]],None]) – A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins online_ab_config_object_property = evidently_mixins.CfnExperimentPropsMixin.OnlineAbConfigObjectProperty( control_treatment_name="controlTreatmentName", treatment_weights=[evidently_mixins.CfnExperimentPropsMixin.TreatmentToWeightProperty( split_weight=123, treatment="treatment" )] )
Attributes
- control_treatment_name
The name of the variation that is to be the default variation that the other variations are compared to.
- treatment_weights
A set of key-value pairs.
The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
RunningStatusObjectProperty
- class CfnExperimentPropsMixin.RunningStatusObjectProperty(*, analysis_complete_time=None, desired_state=None, reason=None, status=None)
Bases:
objectUse this structure to start and stop the experiment.
- Parameters:
analysis_complete_time (
Optional[str]) – If you are using CloudFormation to start the experiment, use this field to specify when the experiment is to end. The format is as a UNIX timestamp. For more information about this format, see The Current Epoch Unix Timestamp .desired_state (
Optional[str]) – If you are using CloudFormation to stop this experiment, specify eitherCOMPLETEDorCANCELLEDhere to indicate how to classify this experiment.reason (
Optional[str]) – If you are using CloudFormation to stop this experiment, this is an optional field that you can use to record why the experiment is being stopped or cancelled.status (
Optional[str]) – To start the experiment now, specifySTARTfor this parameter. If this experiment is currently running and you want to stop it now, specifySTOP.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins running_status_object_property = evidently_mixins.CfnExperimentPropsMixin.RunningStatusObjectProperty( analysis_complete_time="analysisCompleteTime", desired_state="desiredState", reason="reason", status="status" )
Attributes
- analysis_complete_time
If you are using CloudFormation to start the experiment, use this field to specify when the experiment is to end.
The format is as a UNIX timestamp. For more information about this format, see The Current Epoch Unix Timestamp .
- desired_state
If you are using CloudFormation to stop this experiment, specify either
COMPLETEDorCANCELLEDhere to indicate how to classify this experiment.
- reason
If you are using CloudFormation to stop this experiment, this is an optional field that you can use to record why the experiment is being stopped or cancelled.
- status
To start the experiment now, specify
STARTfor this parameter.If this experiment is currently running and you want to stop it now, specify
STOP.
TreatmentObjectProperty
- class CfnExperimentPropsMixin.TreatmentObjectProperty(*, description=None, feature=None, treatment_name=None, variation=None)
Bases:
objectA structure that defines one treatment in an experiment.
A treatment is a variation of the feature that you are including in the experiment.
- Parameters:
description (
Optional[str]) – The description of the treatment.feature (
Optional[str]) – The name of the feature for this experiment.treatment_name (
Optional[str]) – A name for this treatment. It can include up to 127 characters.variation (
Optional[str]) – The name of the variation to use for this treatment.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins treatment_object_property = evidently_mixins.CfnExperimentPropsMixin.TreatmentObjectProperty( description="description", feature="feature", treatment_name="treatmentName", variation="variation" )
Attributes
- description
The description of the treatment.
- feature
The name of the feature for this experiment.
- treatment_name
A name for this treatment.
It can include up to 127 characters.
- variation
The name of the variation to use for this treatment.
TreatmentToWeightProperty
- class CfnExperimentPropsMixin.TreatmentToWeightProperty(*, split_weight=None, treatment=None)
Bases:
objectThis structure defines how much experiment traffic to allocate to one treatment used in the experiment.
- Parameters:
split_weight (
Union[int,float,None]) – The portion of experiment traffic to allocate to this treatment. Specify the traffic portion in thousandths of a percent, so 20,000 allocated to a treatment would allocate 20% of the experiment traffic to that treatment.treatment (
Optional[str]) – The name of the treatment.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins treatment_to_weight_property = evidently_mixins.CfnExperimentPropsMixin.TreatmentToWeightProperty( split_weight=123, treatment="treatment" )
Attributes
- split_weight
The portion of experiment traffic to allocate to this treatment.
Specify the traffic portion in thousandths of a percent, so 20,000 allocated to a treatment would allocate 20% of the experiment traffic to that treatment.