Class: AWSCDK::EventsTargets::Tag

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
events_targets/tag.rb

Overview

Metadata that you apply to a resource to help categorize and organize the resource.

Each tag consists of a key and an optional value, both of which you define.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:) ⇒ Tag

Returns a new instance of Tag.

Parameters:

  • key (String)

    Key is the name of the tag.

  • value (String)

    Value is the metadata contents of the tag.



11
12
13
14
15
16
# File 'events_targets/tag.rb', line 11

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

Instance Attribute Details

#keyString (readonly)

Key is the name of the tag.

Returns:

  • (String)


21
22
23
# File 'events_targets/tag.rb', line 21

def key
  @key
end

#valueString (readonly)

Value is the metadata contents of the tag.

Returns:

  • (String)


25
26
27
# File 'events_targets/tag.rb', line 25

def value
  @value
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'events_targets/tag.rb', line 27

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

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'events_targets/tag.rb', line 34

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