Class: AWSCDK::CloudWatch::CfnAnomalyDetector::DimensionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CfnAnomalyDetector::DimensionProperty
- Defined in:
- cloud_watch/cfn_anomaly_detector.rb
Overview
A dimension is a name/value pair that is part of the identity of a metric.
Because dimensions are part of the unique identifier for a metric, whenever you add a unique name/value pair to one of your metrics, you are creating a new variation of that metric. For example, many Amazon EC2 metrics publish InstanceId as a dimension name, and the actual instance ID as the value for that dimension.
You can assign up to 30 dimensions to a metric.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of the dimension.
-
#value ⇒ String
readonly
The value of the dimension.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, value:) ⇒ DimensionProperty
constructor
A new instance of DimensionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, value:) ⇒ DimensionProperty
Returns a new instance of DimensionProperty.
653 654 655 656 657 658 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 653 def initialize(name:, value:) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") end |
Instance Attribute Details
#name ⇒ String (readonly)
The name of the dimension.
664 665 666 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 664 def name @name end |
#value ⇒ String (readonly)
The value of the dimension.
Dimension values must contain only ASCII characters and must include at least one non-whitespace character. ASCII control characters are not supported as part of dimension values.
671 672 673 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 671 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
673 674 675 676 677 678 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 673 def self.jsii_properties { :name => "name", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
680 681 682 683 684 685 686 687 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 680 def to_jsii result = {} result.merge!({ "name" => @name, "value" => @value, }) result.compact end |