Class: AWSCDK::Evidently::CfnExperiment::MetricGoalObjectProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Evidently::CfnExperiment::MetricGoalObjectProperty
- Defined in:
- evidently/cfn_experiment.rb
Overview
Use this structure to tell Evidently whether higher or lower values are desired for a metric that is used in an experiment.
Instance Attribute Summary collapse
-
#desired_change ⇒ String
readonly
INCREASEmeans that a variation with a higher number for this metric is performing better. -
#entity_id_key ⇒ String
readonly
The entity, such as a user or session, that does an action that causes a metric value to be recorded.
-
#event_pattern ⇒ String?
readonly
The EventBridge event pattern that defines how the metric is recorded.
-
#metric_name ⇒ String
readonly
A name for the metric.
-
#unit_label ⇒ String?
readonly
A label for the units that the metric is measuring.
-
#value_key ⇒ String
readonly
The JSON path to reference the numerical metric value in the event.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(desired_change:, entity_id_key:, metric_name:, value_key:, event_pattern: nil, unit_label: nil) ⇒ MetricGoalObjectProperty
constructor
A new instance of MetricGoalObjectProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(desired_change:, entity_id_key:, metric_name:, value_key:, event_pattern: nil, unit_label: nil) ⇒ MetricGoalObjectProperty
Returns a new instance of MetricGoalObjectProperty.
673 674 675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'evidently/cfn_experiment.rb', line 673 def initialize(desired_change:, entity_id_key:, metric_name:, value_key:, event_pattern: nil, unit_label: nil) @desired_change = desired_change Jsii::Type.check_type(@desired_change, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "desiredChange") @entity_id_key = entity_id_key Jsii::Type.check_type(@entity_id_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "entityIdKey") @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") @value_key = value_key Jsii::Type.check_type(@value_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "valueKey") @event_pattern = event_pattern Jsii::Type.check_type(@event_pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventPattern") unless @event_pattern.nil? @unit_label = unit_label Jsii::Type.check_type(@unit_label, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unitLabel") unless @unit_label.nil? end |
Instance Attribute Details
#desired_change ⇒ String (readonly)
INCREASE means that a variation with a higher number for this metric is performing better.
DECREASE means that a variation with a lower number for this metric is performing better.
694 695 696 |
# File 'evidently/cfn_experiment.rb', line 694 def desired_change @desired_change end |
#entity_id_key ⇒ String (readonly)
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 .
701 702 703 |
# File 'evidently/cfn_experiment.rb', line 701 def entity_id_key @entity_id_key end |
#event_pattern ⇒ String? (readonly)
The EventBridge event pattern that defines how the metric is recorded.
For more information about EventBridge event patterns, see Amazon EventBridge event patterns .
720 721 722 |
# File 'evidently/cfn_experiment.rb', line 720 def event_pattern @event_pattern end |
#metric_name ⇒ String (readonly)
A name for the metric.
It can include up to 255 characters.
708 709 710 |
# File 'evidently/cfn_experiment.rb', line 708 def metric_name @metric_name end |
#unit_label ⇒ String? (readonly)
A label for the units that the metric is measuring.
725 726 727 |
# File 'evidently/cfn_experiment.rb', line 725 def unit_label @unit_label end |
#value_key ⇒ String (readonly)
The JSON path to reference the numerical metric value in the event.
713 714 715 |
# File 'evidently/cfn_experiment.rb', line 713 def value_key @value_key end |
Class Method Details
.jsii_properties ⇒ Object
727 728 729 730 731 732 733 734 735 736 |
# File 'evidently/cfn_experiment.rb', line 727 def self.jsii_properties { :desired_change => "desiredChange", :entity_id_key => "entityIdKey", :metric_name => "metricName", :value_key => "valueKey", :event_pattern => "eventPattern", :unit_label => "unitLabel", } end |
Instance Method Details
#to_jsii ⇒ Object
738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'evidently/cfn_experiment.rb', line 738 def to_jsii result = {} result.merge!({ "desiredChange" => @desired_change, "entityIdKey" => @entity_id_key, "metricName" => @metric_name, "valueKey" => @value_key, "eventPattern" => @event_pattern, "unitLabel" => @unit_label, }) result.compact end |