Class: AWSCDK::Logs::CfnTransformer::ParseCloudfrontProperty

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

Overview

This processor parses CloudFront vended logs, extract fields, and convert them into JSON format.

Encoded field values are decoded. Values that are integers and doubles are treated as such. For more information about this processor including examples, see parseCloudfront

For more information about CloudFront log format, see Configure and use standard logs (access logs) .

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) ⇒ ParseCloudfrontProperty

Returns a new instance of ParseCloudfrontProperty.

Parameters:

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

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



1185
1186
1187
1188
# File 'logs/cfn_transformer.rb', line 1185

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 .



1196
1197
1198
# File 'logs/cfn_transformer.rb', line 1196

def source
  @source
end

Class Method Details

.jsii_propertiesObject



1198
1199
1200
1201
1202
# File 'logs/cfn_transformer.rb', line 1198

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

Instance Method Details

#to_jsiiObject



1204
1205
1206
1207
1208
1209
1210
# File 'logs/cfn_transformer.rb', line 1204

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