Class: AWSCDK::Evidently::CfnExperimentProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Evidently::CfnExperimentProps
- Defined in:
- evidently/cfn_experiment_props.rb
Overview
Properties for defining a CfnExperiment.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
An optional description of the experiment.
-
#metric_goals ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Evidently::CfnExperiment::MetricGoalObjectProperty>
readonly
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.
-
#name ⇒ String
readonly
A name for the new experiment.
-
#online_ab_config ⇒ AWSCDK::IResolvable, AWSCDK::Evidently::CfnExperiment::OnlineAbConfigObjectProperty
readonly
A structure that contains the configuration of which variation to use as the "control" version.
-
#project ⇒ String
readonly
The name or the ARN of the project where this experiment is to be created.
-
#randomization_salt ⇒ String?
readonly
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.
-
#remove_segment ⇒ Boolean, ...
readonly
Set this to
trueto remove the segment that is associated with this experiment. -
#running_status ⇒ AWSCDK::IResolvable, ...
readonly
A structure that you can use to start and stop the experiment.
-
#sampling_rate ⇒ Numeric?
readonly
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent.
-
#segment ⇒ String?
readonly
Specifies an audience segment to use in the experiment.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Assigns one or more tags (key-value pairs) to the experiment.
-
#treatments ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Evidently::CfnExperiment::TreatmentObjectProperty>
readonly
An array of structures that describe the configuration of each feature variation used in the experiment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metric_goals:, name:, online_ab_config:, project:, treatments:, description: nil, randomization_salt: nil, remove_segment: nil, running_status: nil, sampling_rate: nil, segment: nil, tags: nil) ⇒ CfnExperimentProps
constructor
A new instance of CfnExperimentProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metric_goals:, name:, online_ab_config:, project:, treatments:, description: nil, randomization_salt: nil, remove_segment: nil, running_status: nil, sampling_rate: nil, segment: nil, tags: nil) ⇒ CfnExperimentProps
Returns a new instance of CfnExperimentProps.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'evidently/cfn_experiment_props.rb', line 21 def initialize(metric_goals:, name:, online_ab_config:, project:, treatments:, description: nil, randomization_salt: nil, remove_segment: nil, running_status: nil, sampling_rate: nil, segment: nil, tags: nil) @metric_goals = metric_goals Jsii::Type.check_type(@metric_goals, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZpZGVudGx5LkNmbkV4cGVyaW1lbnQuTWV0cmljR29hbE9iamVjdFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "metricGoals") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @online_ab_config = online_ab_config.is_a?(Hash) ? ::AWSCDK::Evidently::CfnExperiment::OnlineAbConfigObjectProperty.new(**online_ab_config.transform_keys(&:to_sym)) : online_ab_config Jsii::Type.check_type(@online_ab_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmlkZW50bHkuQ2ZuRXhwZXJpbWVudC5PbmxpbmVBYkNvbmZpZ09iamVjdFByb3BlcnR5In1dfX0=")), "onlineAbConfig") @project = project Jsii::Type.check_type(@project, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "project") @treatments = treatments Jsii::Type.check_type(@treatments, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZpZGVudGx5LkNmbkV4cGVyaW1lbnQuVHJlYXRtZW50T2JqZWN0UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "treatments") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @randomization_salt = randomization_salt Jsii::Type.check_type(@randomization_salt, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "randomizationSalt") unless @randomization_salt.nil? @remove_segment = remove_segment Jsii::Type.check_type(@remove_segment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "removeSegment") unless @remove_segment.nil? @running_status = running_status.is_a?(Hash) ? ::AWSCDK::Evidently::CfnExperiment::RunningStatusObjectProperty.new(**running_status.transform_keys(&:to_sym)) : running_status Jsii::Type.check_type(@running_status, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmlkZW50bHkuQ2ZuRXhwZXJpbWVudC5SdW5uaW5nU3RhdHVzT2JqZWN0UHJvcGVydHkifV19fQ==")), "runningStatus") unless @running_status.nil? @sampling_rate = sampling_rate Jsii::Type.check_type(@sampling_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "samplingRate") unless @sampling_rate.nil? @segment = segment Jsii::Type.check_type(@segment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "segment") unless @segment.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
An optional description of the experiment.
81 82 83 |
# File 'evidently/cfn_experiment_props.rb', line 81 def description @description end |
#metric_goals ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Evidently::CfnExperiment::MetricGoalObjectProperty> (readonly)
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.
54 55 56 |
# File 'evidently/cfn_experiment_props.rb', line 54 def metric_goals @metric_goals end |
#name ⇒ String (readonly)
A name for the new experiment.
59 60 61 |
# File 'evidently/cfn_experiment_props.rb', line 59 def name @name end |
#online_ab_config ⇒ AWSCDK::IResolvable, AWSCDK::Evidently::CfnExperiment::OnlineAbConfigObjectProperty (readonly)
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.
66 67 68 |
# File 'evidently/cfn_experiment_props.rb', line 66 def online_ab_config @online_ab_config end |
#project ⇒ String (readonly)
The name or the ARN of the project where this experiment is to be created.
71 72 73 |
# File 'evidently/cfn_experiment_props.rb', line 71 def project @project end |
#randomization_salt ⇒ String? (readonly)
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 randomization_salt . If you omit randomization_salt , Evidently uses the experiment name as the randomization_salt .
88 89 90 |
# File 'evidently/cfn_experiment_props.rb', line 88 def randomization_salt @randomization_salt end |
#remove_segment ⇒ Boolean, ... (readonly)
Set this to true to remove the segment that is associated with this experiment.
You can't use this parameter if the experiment is currently running.
95 96 97 |
# File 'evidently/cfn_experiment_props.rb', line 95 def remove_segment @remove_segment end |
#running_status ⇒ AWSCDK::IResolvable, ... (readonly)
A structure that you can use to start and stop the experiment.
100 101 102 |
# File 'evidently/cfn_experiment_props.rb', line 100 def running_status @running_status end |
#sampling_rate ⇒ Numeric? (readonly)
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.
109 110 111 |
# File 'evidently/cfn_experiment_props.rb', line 109 def sampling_rate @sampling_rate end |
#segment ⇒ String? (readonly)
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 .
118 119 120 |
# File 'evidently/cfn_experiment_props.rb', line 118 def segment @segment end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
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 .
131 132 133 |
# File 'evidently/cfn_experiment_props.rb', line 131 def @tags end |
#treatments ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Evidently::CfnExperiment::TreatmentObjectProperty> (readonly)
An array of structures that describe the configuration of each feature variation used in the experiment.
76 77 78 |
# File 'evidently/cfn_experiment_props.rb', line 76 def treatments @treatments end |
Class Method Details
.jsii_properties ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'evidently/cfn_experiment_props.rb', line 133 def self.jsii_properties { :metric_goals => "metricGoals", :name => "name", :online_ab_config => "onlineAbConfig", :project => "project", :treatments => "treatments", :description => "description", :randomization_salt => "randomizationSalt", :remove_segment => "removeSegment", :running_status => "runningStatus", :sampling_rate => "samplingRate", :segment => "segment", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'evidently/cfn_experiment_props.rb', line 150 def to_jsii result = {} result.merge!({ "metricGoals" => @metric_goals, "name" => @name, "onlineAbConfig" => @online_ab_config, "project" => @project, "treatments" => @treatments, "description" => @description, "randomizationSalt" => @randomization_salt, "removeSegment" => @remove_segment, "runningStatus" => @running_status, "samplingRate" => @sampling_rate, "segment" => @segment, "tags" => @tags, }) result.compact end |