class Amazonite::CloudWatchLogs::ListToMap

Overview

This processor takes a list of objects that contain key fields, and converts them into a map of target keys.

For more information about this processor including examples, see listToMap in the CloudWatch Logs User Guide.

Included Modules

Defined in:

cloudwatch_logs/list_to_map.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(source : String, key : String, value_key : String | Nil = nil, target : String | Nil = nil, flatten : Bool | Nil = nil, flattened_element : FlattenedElement | Nil = nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def flatten : Bool | Nil #

A Boolean value to indicate whether the list will be flattened into single items. Specify true to flatten the list. The default is false


[View source]
def flatten=(flatten : Bool | Nil) #

A Boolean value to indicate whether the list will be flattened into single items. Specify true to flatten the list. The default is false


[View source]
def flattened_element : FlattenedElement | Nil #

If you set #flatten to true, use flattenedElement to specify which element, first or last, to keep.

You must specify this parameter if #flatten is true


[View source]
def flattened_element=(flattened_element : FlattenedElement | Nil) #

If you set #flatten to true, use flattenedElement to specify which element, first or last, to keep.

You must specify this parameter if #flatten is true


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def key : String #

The key of the field to be extracted as keys in the generated map


[View source]
def key=(key : String) #

The key of the field to be extracted as keys in the generated map


[View source]
def source : String #

The key in the log event that has a list of objects that will be converted to a map.


[View source]
def source=(source : String) #

The key in the log event that has a list of objects that will be converted to a map.


[View source]
def target : String | Nil #

The key of the field that will hold the generated map


[View source]
def target=(target : String | Nil) #

The key of the field that will hold the generated map


[View source]
def validate! : Nil #

[View source]
def value_key : String | Nil #

If this is specified, the values that you specify in this parameter will be extracted from the #source objects and put into the values of the generated map. Otherwise, original objects in the source list will be put into the values of the generated map.


[View source]
def value_key=(value_key : String | Nil) #

If this is specified, the values that you specify in this parameter will be extracted from the #source objects and put into the values of the generated map. Otherwise, original objects in the source list will be put into the values of the generated map.


[View source]