Class: AWSCDK::Logs::CfnTransformer::ParseKeyValueProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Logs::CfnTransformer::ParseKeyValueProperty
- Defined in:
- logs/cfn_transformer.rb
Overview
This processor parses a specified field in the original log event into key-value pairs.
For more information about this processor including examples, see parseKeyValue in the CloudWatch Logs User Guide .
Instance Attribute Summary collapse
-
#destination ⇒ String?
readonly
The destination field to put the extracted key-value pairs into.
-
#field_delimiter ⇒ String?
readonly
The field delimiter string that is used between key-value pairs in the original log events.
-
#key_prefix ⇒ String?
readonly
If you want to add a prefix to all transformed keys, specify it here.
-
#key_value_delimiter ⇒ String?
readonly
The delimiter string to use between the key and value in each pair in the transformed log event.
-
#non_match_value ⇒ String?
readonly
A value to insert into the value field in the result, when a key-value pair is not successfully split.
-
#overwrite_if_exists ⇒ Boolean, ...
readonly
Specifies whether to overwrite the value if the destination key already exists.
-
#source ⇒ String?
readonly
Path to the field in the log event that will be parsed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(destination: nil, field_delimiter: nil, key_prefix: nil, key_value_delimiter: nil, non_match_value: nil, overwrite_if_exists: nil, source: nil) ⇒ ParseKeyValueProperty
constructor
A new instance of ParseKeyValueProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(destination: nil, field_delimiter: nil, key_prefix: nil, key_value_delimiter: nil, non_match_value: nil, overwrite_if_exists: nil, source: nil) ⇒ ParseKeyValueProperty
Returns a new instance of ParseKeyValueProperty.
1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 |
# File 'logs/cfn_transformer.rb', line 1281 def initialize(destination: nil, field_delimiter: nil, key_prefix: nil, key_value_delimiter: nil, non_match_value: nil, overwrite_if_exists: nil, source: nil) @destination = destination Jsii::Type.check_type(@destination, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destination") unless @destination.nil? @field_delimiter = field_delimiter Jsii::Type.check_type(@field_delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fieldDelimiter") unless @field_delimiter.nil? @key_prefix = key_prefix Jsii::Type.check_type(@key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyPrefix") unless @key_prefix.nil? @key_value_delimiter = key_value_delimiter Jsii::Type.check_type(@key_value_delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyValueDelimiter") unless @key_value_delimiter.nil? @non_match_value = non_match_value Jsii::Type.check_type(@non_match_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nonMatchValue") unless @non_match_value.nil? @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? @source = source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source") unless @source.nil? end |
Instance Attribute Details
#destination ⇒ String? (readonly)
The destination field to put the extracted key-value pairs into.
1302 1303 1304 |
# File 'logs/cfn_transformer.rb', line 1302 def destination @destination end |
#field_delimiter ⇒ String? (readonly)
The field delimiter string that is used between key-value pairs in the original log events.
If you omit this, the ampersand & character is used.
1309 1310 1311 |
# File 'logs/cfn_transformer.rb', line 1309 def field_delimiter @field_delimiter end |
#key_prefix ⇒ String? (readonly)
If you want to add a prefix to all transformed keys, specify it here.
1314 1315 1316 |
# File 'logs/cfn_transformer.rb', line 1314 def key_prefix @key_prefix end |
#key_value_delimiter ⇒ String? (readonly)
The delimiter string to use between the key and value in each pair in the transformed log event.
If you omit this, the equal = character is used.
1321 1322 1323 |
# File 'logs/cfn_transformer.rb', line 1321 def key_value_delimiter @key_value_delimiter end |
#non_match_value ⇒ String? (readonly)
A value to insert into the value field in the result, when a key-value pair is not successfully split.
1326 1327 1328 |
# File 'logs/cfn_transformer.rb', line 1326 def non_match_value @non_match_value end |
#overwrite_if_exists ⇒ Boolean, ... (readonly)
Specifies whether to overwrite the value if the destination key already exists.
If you omit this, the default is false .
1333 1334 1335 |
# File 'logs/cfn_transformer.rb', line 1333 def overwrite_if_exists @overwrite_if_exists end |
#source ⇒ String? (readonly)
Path to the field in the log event that will be parsed.
Use dot notation to access child fields. For example, store.book
1340 1341 1342 |
# File 'logs/cfn_transformer.rb', line 1340 def source @source end |
Class Method Details
.jsii_properties ⇒ Object
1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 |
# File 'logs/cfn_transformer.rb', line 1342 def self.jsii_properties { :destination => "destination", :field_delimiter => "fieldDelimiter", :key_prefix => "keyPrefix", :key_value_delimiter => "keyValueDelimiter", :non_match_value => "nonMatchValue", :overwrite_if_exists => "overwriteIfExists", :source => "source", } end |
Instance Method Details
#to_jsii ⇒ Object
1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 |
# File 'logs/cfn_transformer.rb', line 1354 def to_jsii result = {} result.merge!({ "destination" => @destination, "fieldDelimiter" => @field_delimiter, "keyPrefix" => @key_prefix, "keyValueDelimiter" => @key_value_delimiter, "nonMatchValue" => @non_match_value, "overwriteIfExists" => @overwrite_if_exists, "source" => @source, }) result.compact end |