Class: AWSCDK::Logs::AddKeyEntryProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
logs/add_key_entry_property.rb

Overview

This object defines one key that will be added with the addKeys processor.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:, overwrite_if_exists: nil) ⇒ AddKeyEntryProperty

Returns a new instance of AddKeyEntryProperty.

Parameters:

  • key (String)

    The key of the new entry to be added to the log event.

  • value (String)

    The value of the new entry to be added to the log event.

  • overwrite_if_exists (Boolean, nil) (defaults to: nil)

    Specifies whether to overwrite the value if the key already exists.



10
11
12
13
14
15
16
17
# File 'logs/add_key_entry_property.rb', line 10

def initialize(key:, value:, overwrite_if_exists: nil)
  @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")
  @overwrite_if_exists = overwrite_if_exists
  Jsii::Type.check_type(@overwrite_if_exists, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "overwriteIfExists") unless @overwrite_if_exists.nil?
end

Instance Attribute Details

#keyString (readonly)

The key of the new entry to be added to the log event.

Returns:

  • (String)


22
23
24
# File 'logs/add_key_entry_property.rb', line 22

def key
  @key
end

#overwrite_if_existsBoolean? (readonly)

Note:

Default: false

Specifies whether to overwrite the value if the key already exists.

Returns:

  • (Boolean, nil)


31
32
33
# File 'logs/add_key_entry_property.rb', line 31

def overwrite_if_exists
  @overwrite_if_exists
end

#valueString (readonly)

The value of the new entry to be added to the log event.

Returns:

  • (String)


26
27
28
# File 'logs/add_key_entry_property.rb', line 26

def value
  @value
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
39
# File 'logs/add_key_entry_property.rb', line 33

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

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
49
# File 'logs/add_key_entry_property.rb', line 41

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