Class: AWSCDK::Evidently::CfnLaunch::MetricDefinitionObjectProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Evidently::CfnLaunch::MetricDefinitionObjectProperty
- Defined in:
- evidently/cfn_launch.rb
Overview
This structure defines a metric that you want to use to evaluate the variations during a launch or experiment.
Instance Attribute Summary collapse
-
#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 value that is tracked to produce the metric.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(entity_id_key:, metric_name:, value_key:, event_pattern: nil, unit_label: nil) ⇒ MetricDefinitionObjectProperty
constructor
A new instance of MetricDefinitionObjectProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(entity_id_key:, metric_name:, value_key:, event_pattern: nil, unit_label: nil) ⇒ MetricDefinitionObjectProperty
Returns a new instance of MetricDefinitionObjectProperty.
803 804 805 806 807 808 809 810 811 812 813 814 |
# File 'evidently/cfn_launch.rb', line 803 def initialize(entity_id_key:, metric_name:, value_key:, event_pattern: nil, unit_label: nil) @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
#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 .
822 823 824 |
# File 'evidently/cfn_launch.rb', line 822 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 .
841 842 843 |
# File 'evidently/cfn_launch.rb', line 841 def event_pattern @event_pattern end |
#metric_name ⇒ String (readonly)
A name for the metric.
It can include up to 255 characters.
829 830 831 |
# File 'evidently/cfn_launch.rb', line 829 def metric_name @metric_name end |
#unit_label ⇒ String? (readonly)
A label for the units that the metric is measuring.
846 847 848 |
# File 'evidently/cfn_launch.rb', line 846 def unit_label @unit_label end |
#value_key ⇒ String (readonly)
The value that is tracked to produce the metric.
834 835 836 |
# File 'evidently/cfn_launch.rb', line 834 def value_key @value_key end |
Class Method Details
.jsii_properties ⇒ Object
848 849 850 851 852 853 854 855 856 |
# File 'evidently/cfn_launch.rb', line 848 def self.jsii_properties { :entity_id_key => "entityIdKey", :metric_name => "metricName", :value_key => "valueKey", :event_pattern => "eventPattern", :unit_label => "unitLabel", } end |
Instance Method Details
#to_jsii ⇒ Object
858 859 860 861 862 863 864 865 866 867 868 |
# File 'evidently/cfn_launch.rb', line 858 def to_jsii result = {} result.merge!({ "entityIdKey" => @entity_id_key, "metricName" => @metric_name, "valueKey" => @value_key, "eventPattern" => @event_pattern, "unitLabel" => @unit_label, }) result.compact end |