Class: AWSCDK::Logs::CfnTransformer::ParseWAFProperty

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

Overview

Use this processor to parse AWS WAF vended logs, extract fields, and and convert them into a JSON format.

This processor always processes the entire log event message. For more information about this processor including examples, see parseWAF .

For more information about AWS WAF log format, see Log examples for web ACL traffic .

If you use this processor, it must be the first processor in your transformer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source: nil) ⇒ ParseWAFProperty

Returns a new instance of ParseWAFProperty.

Parameters:

  • source (String, nil) (defaults to: nil)

    Omit this parameter and the whole log message will be processed by this processor.



1570
1571
1572
1573
# File 'logs/cfn_transformer.rb', line 1570

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

Instance Attribute Details

#sourceString? (readonly)

Omit this parameter and the whole log message will be processed by this processor.

No other value than @message is allowed for source .



1581
1582
1583
# File 'logs/cfn_transformer.rb', line 1581

def source
  @source
end

Class Method Details

.jsii_propertiesObject



1583
1584
1585
1586
1587
# File 'logs/cfn_transformer.rb', line 1583

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

Instance Method Details

#to_jsiiObject



1589
1590
1591
1592
1593
1594
1595
# File 'logs/cfn_transformer.rb', line 1589

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