Class: AWSCDK::S3::Tag

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

Overview

Tag.

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 to e tagged.

  • value (String)

    additional value.



9
10
11
12
13
14
# File 's3/tag.rb', line 9

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 to e tagged.

Returns:

  • (String)


19
20
21
# File 's3/tag.rb', line 19

def key
  @key
end

#valueString (readonly)

additional value.

Returns:

  • (String)


23
24
25
# File 's3/tag.rb', line 23

def value
  @value
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 's3/tag.rb', line 25

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

Instance Method Details

#to_jsiiObject



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

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