Class: AWSCDK::LookoutMetrics::CfnAnomalyDetector::MetricProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lookout_metrics/cfn_anomaly_detector.rb

Overview

A calculation made by contrasting a measure and a dimension from your source data.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aggregation_function:, metric_name:, namespace: nil) ⇒ MetricProperty

Returns a new instance of MetricProperty.

Parameters:

  • aggregation_function (String)

    The function with which the metric is calculated.

  • metric_name (String)

    The name of the metric.

  • namespace (String, nil) (defaults to: nil)

    The namespace for the metric.



846
847
848
849
850
851
852
853
# File 'lookout_metrics/cfn_anomaly_detector.rb', line 846

def initialize(aggregation_function:, metric_name:, namespace: nil)
  @aggregation_function = aggregation_function
  Jsii::Type.check_type(@aggregation_function, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "aggregationFunction")
  @metric_name = metric_name
  Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName")
  @namespace = namespace
  Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil?
end

Instance Attribute Details

#aggregation_functionString (readonly)

The function with which the metric is calculated.



859
860
861
# File 'lookout_metrics/cfn_anomaly_detector.rb', line 859

def aggregation_function
  @aggregation_function
end

#metric_nameString (readonly)

The name of the metric.



864
865
866
# File 'lookout_metrics/cfn_anomaly_detector.rb', line 864

def metric_name
  @metric_name
end

#namespaceString? (readonly)

The namespace for the metric.



869
870
871
# File 'lookout_metrics/cfn_anomaly_detector.rb', line 869

def namespace
  @namespace
end

Class Method Details

.jsii_propertiesObject



871
872
873
874
875
876
877
# File 'lookout_metrics/cfn_anomaly_detector.rb', line 871

def self.jsii_properties
  {
    :aggregation_function => "aggregationFunction",
    :metric_name => "metricName",
    :namespace => "namespace",
  }
end

Instance Method Details

#to_jsiiObject



879
880
881
882
883
884
885
886
887
# File 'lookout_metrics/cfn_anomaly_detector.rb', line 879

def to_jsii
  result = {}
  result.merge!({
    "aggregationFunction" => @aggregation_function,
    "metricName" => @metric_name,
    "namespace" => @namespace,
  })
  result.compact
end