Class: AWSCDK::Logs::SubstituteStringEntryProperty

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

Overview

This object defines one log field key that will be replaced using the substituteString processor.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from:, source:, to:) ⇒ SubstituteStringEntryProperty

Returns a new instance of SubstituteStringEntryProperty.

Parameters:

  • from (String)

    The regular expression string to be replaced.

  • source (String)

    The key to modify.

  • to (String)

    The string to be substituted for each match of from.



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

def initialize(from:, source:, to:)
  @from = from
  Jsii::Type.check_type(@from, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "from")
  @source = source
  Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source")
  @to = to
  Jsii::Type.check_type(@to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "to")
end

Instance Attribute Details

#fromString (readonly)

The regular expression string to be replaced.

Returns:

  • (String)


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

def from
  @from
end

#sourceString (readonly)

The key to modify.

Returns:

  • (String)


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

def source
  @source
end

#toString (readonly)

The string to be substituted for each match of from.

Returns:

  • (String)


30
31
32
# File 'logs/substitute_string_entry_property.rb', line 30

def to
  @to
end

Class Method Details

.jsii_propertiesObject



32
33
34
35
36
37
38
# File 'logs/substitute_string_entry_property.rb', line 32

def self.jsii_properties
  {
    :from => "from",
    :source => "source",
    :to => "to",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "from" => @from,
    "source" => @source,
    "to" => @to,
  })
  result.compact
end