Class: AWSCDK::Logs::CfnTransformer::AddKeyEntryProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
logs/cfn_transformer.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, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether to overwrite the value if the key already exists in the log event.



521
522
523
524
525
526
527
528
# File 'logs/cfn_transformer.rb', line 521

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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "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.



534
535
536
# File 'logs/cfn_transformer.rb', line 534

def key
  @key
end

#overwrite_if_existsBoolean, ... (readonly)

Specifies whether to overwrite the value if the key already exists in the log event.

If you omit this, the default is false .



546
547
548
# File 'logs/cfn_transformer.rb', line 546

def overwrite_if_exists
  @overwrite_if_exists
end

#valueString (readonly)

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



539
540
541
# File 'logs/cfn_transformer.rb', line 539

def value
  @value
end

Class Method Details

.jsii_propertiesObject



548
549
550
551
552
553
554
# File 'logs/cfn_transformer.rb', line 548

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

Instance Method Details

#to_jsiiObject



556
557
558
559
560
561
562
563
564
# File 'logs/cfn_transformer.rb', line 556

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