Class: AWSCDK::CloudWatch::CfnAlarm::DimensionProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ DimensionProperty

Returns a new instance of DimensionProperty.

Parameters:

  • name (String)

    The name of the dimension, from 1–255 characters in length.

  • value (String)

    The value for the dimension, from 1–255 characters in length.



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

#nameString (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

#valueString (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_propertiesObject



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_jsiiObject



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