Class: AWSCDK::CloudWatch::CfnAnomalyDetector::MetricProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CfnAnomalyDetector::MetricProperty
- Defined in:
- cloud_watch/cfn_anomaly_detector.rb
Overview
Represents a specific metric.
Instance Attribute Summary collapse
-
#dimensions ⇒ AWSCDK::IResolvable, ...
readonly
The dimensions for the metric.
-
#metric_name ⇒ String
readonly
The name of the metric.
-
#namespace ⇒ String
readonly
The namespace of the metric.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metric_name:, namespace:, dimensions: nil) ⇒ MetricProperty
constructor
A new instance of MetricProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metric_name:, namespace:, dimensions: nil) ⇒ MetricProperty
Returns a new instance of MetricProperty.
900 901 902 903 904 905 906 907 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 900 def initialize(metric_name:, namespace:, dimensions: nil) @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") @dimensions = dimensions Jsii::Type.check_type(@dimensions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5DZm5Bbm9tYWx5RGV0ZWN0b3IuRGltZW5zaW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "dimensions") unless @dimensions.nil? end |
Instance Attribute Details
#dimensions ⇒ AWSCDK::IResolvable, ... (readonly)
The dimensions for the metric.
925 926 927 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 925 def dimensions @dimensions end |
#metric_name ⇒ String (readonly)
The name of the metric.
This is a required field.
915 916 917 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 915 def metric_name @metric_name end |
#namespace ⇒ String (readonly)
The namespace of the metric.
920 921 922 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 920 def namespace @namespace end |
Class Method Details
.jsii_properties ⇒ Object
927 928 929 930 931 932 933 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 927 def self.jsii_properties { :metric_name => "metricName", :namespace => "namespace", :dimensions => "dimensions", } end |
Instance Method Details
#to_jsii ⇒ Object
935 936 937 938 939 940 941 942 943 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 935 def to_jsii result = {} result.merge!({ "metricName" => @metric_name, "namespace" => @namespace, "dimensions" => @dimensions, }) result.compact end |