Class: AWSCDK::Evidently::CfnLaunch::SegmentOverrideProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Evidently::CfnLaunch::SegmentOverrideProperty
- Defined in:
- evidently/cfn_launch.rb
Overview
Use this structure to specify different traffic splits for one or more audience segments .
A segment is a portion of your audience that share one or more characteristics. Examples could be Chrome browser users, users in Europe, or Firefox browser users in Europe who also fit other criteria that your application collects, such as age.
For more information, see Use segments to focus your audience .
This sructure is an array of up to six segment override objects. Each of these objects specifies a segment that you have already created, and defines the traffic split for that segment.
Instance Attribute Summary collapse
-
#evaluation_order ⇒ Numeric
readonly
A number indicating the order to use to evaluate segment overrides, if there are more than one.
-
#segment ⇒ String
readonly
The ARN of the segment to use for this override.
-
#weights ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Evidently::CfnLaunch::GroupToWeightProperty>
readonly
The traffic allocation percentages among the feature variations to assign to this segment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(evaluation_order:, segment:, weights:) ⇒ SegmentOverrideProperty
constructor
A new instance of SegmentOverrideProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(evaluation_order:, segment:, weights:) ⇒ SegmentOverrideProperty
Returns a new instance of SegmentOverrideProperty.
886 887 888 889 890 891 892 893 |
# File 'evidently/cfn_launch.rb', line 886 def initialize(evaluation_order:, segment:, weights:) @evaluation_order = evaluation_order Jsii::Type.check_type(@evaluation_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "evaluationOrder") @segment = segment Jsii::Type.check_type(@segment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "segment") @weights = weights Jsii::Type.check_type(@weights, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZpZGVudGx5LkNmbkxhdW5jaC5Hcm91cFRvV2VpZ2h0UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "weights") end |
Instance Attribute Details
#evaluation_order ⇒ Numeric (readonly)
A number indicating the order to use to evaluate segment overrides, if there are more than one.
Segment overrides with lower numbers are evaluated first.
901 902 903 |
# File 'evidently/cfn_launch.rb', line 901 def evaluation_order @evaluation_order end |
#segment ⇒ String (readonly)
The ARN of the segment to use for this override.
906 907 908 |
# File 'evidently/cfn_launch.rb', line 906 def segment @segment end |
#weights ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Evidently::CfnLaunch::GroupToWeightProperty> (readonly)
The traffic allocation percentages among the feature variations to assign to this segment.
This is a set of key-value pairs. The keys are variation names. The values represent the amount of traffic to allocate to that variation for this segment. This is expressed in thousandths of a percent, so a weight of 50000 represents 50% of traffic.
913 914 915 |
# File 'evidently/cfn_launch.rb', line 913 def weights @weights end |
Class Method Details
.jsii_properties ⇒ Object
915 916 917 918 919 920 921 |
# File 'evidently/cfn_launch.rb', line 915 def self.jsii_properties { :evaluation_order => "evaluationOrder", :segment => "segment", :weights => "weights", } end |
Instance Method Details
#to_jsii ⇒ Object
923 924 925 926 927 928 929 930 931 |
# File 'evidently/cfn_launch.rb', line 923 def to_jsii result = {} result.merge!({ "evaluationOrder" => @evaluation_order, "segment" => @segment, "weights" => @weights, }) result.compact end |