Class: AWSCDK::Logs::CopyValueEntryProperty

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

Overview

This object defines one value to be copied with the copyValue processor.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source:, target:, overwrite_if_exists: nil) ⇒ CopyValueEntryProperty

Returns a new instance of CopyValueEntryProperty.

Parameters:

  • source (String)

    The key to copy.

  • target (String)

    The key of the field to copy the value to.

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

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



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

def initialize(source:, target:, overwrite_if_exists: nil)
  @source = source
  Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source")
  @target = target
  Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "target")
  @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

#overwrite_if_existsBoolean? (readonly)

Note:

Default: false

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

Returns:

  • (Boolean, nil)


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

def overwrite_if_exists
  @overwrite_if_exists
end

#sourceString (readonly)

The key to copy.

Returns:

  • (String)


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

def source
  @source
end

#targetString (readonly)

The key of the field to copy the value to.

Returns:

  • (String)


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

def target
  @target
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :source => "source",
    :target => "target",
    :overwrite_if_exists => "overwriteIfExists",
  }
end

Instance Method Details

#to_jsiiObject



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

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