Class: AWSCDK::CloudWatch::CfnAlarm::DimensionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CfnAlarm::DimensionProperty
- Defined in:
- cloud_watch/cfn_alarm.rb
Overview
Dimension is an embedded property of the AWS::CloudWatch::Alarm type.
Dimensions are name/value pairs that can be associated with a CloudWatch metric. You can specify a maximum of 30 dimensions for a given metric.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of the dimension, from 1–255 characters in length.
-
#value ⇒ String
readonly
The value for the dimension, from 1–255 characters in length.
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.
909 910 911 912 913 914 |
# File 'cloud_watch/cfn_alarm.rb', line 909 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, from 1–255 characters in length.
This dimension name must have been included when the metric was published.
922 923 924 |
# File 'cloud_watch/cfn_alarm.rb', line 922 def name @name end |
#value ⇒ String (readonly)
The value for the dimension, from 1–255 characters in length.
927 928 929 |
# File 'cloud_watch/cfn_alarm.rb', line 927 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
929 930 931 932 933 934 |
# File 'cloud_watch/cfn_alarm.rb', line 929 def self.jsii_properties { :name => "name", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
936 937 938 939 940 941 942 943 |
# File 'cloud_watch/cfn_alarm.rb', line 936 def to_jsii result = {} result.merge!({ "name" => @name, "value" => @value, }) result.compact end |