Class: AWSCDK::CloudWatch::VariableValue

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_watch/variable_value.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, label: nil) ⇒ VariableValue

Returns a new instance of VariableValue.

Parameters:

  • value (String)

    Value of the selected item.

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

    Optional label for the selected item.



8
9
10
11
12
13
# File 'cloud_watch/variable_value.rb', line 8

def initialize(value:, label: nil)
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
  @label = label
  Jsii::Type.check_type(@label, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "label") unless @label.nil?
end

Instance Attribute Details

#labelString? (readonly)

Note:

Default: - the variable's value

Optional label for the selected item.

Returns:

  • (String, nil)


23
24
25
# File 'cloud_watch/variable_value.rb', line 23

def label
  @label
end

#valueString (readonly)

Value of the selected item.

Returns:

  • (String)


18
19
20
# File 'cloud_watch/variable_value.rb', line 18

def value
  @value
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'cloud_watch/variable_value.rb', line 25

def self.jsii_properties
  {
    :value => "value",
    :label => "label",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
# File 'cloud_watch/variable_value.rb', line 32

def to_jsii
  result = {}
  result.merge!({
    "value" => @value,
    "label" => @label,
  })
  result.compact
end