Skip to content

ListToMap

Source code in docs_src/capo_cloudwatch_logs/types/list_to_map.py
class ListToMap(TypedDict, closed=True):
    source: "capo_cloudwatch_logs.types.source.Source"
    """<p>The key in the log event that has a list of objects that will be converted to a map.</p>"""
    key: "capo_cloudwatch_logs.types.key.Key"
    """<p>The key of the field to be extracted as keys in the generated map</p>"""
    value_key: NotRequired["capo_cloudwatch_logs.types.value_key.ValueKey"]
    """<p>If this is specified, the values that you specify in this parameter will be extracted from the <code>source</code> 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.</p>"""
    target: NotRequired["capo_cloudwatch_logs.types.target.Target"]
    """<p>The key of the field that will hold the generated map </p>"""
    flatten: "capo_cloudwatch_logs.types.flatten.Flatten"
    """<p>A Boolean value to indicate whether the list will be flattened into single items. Specify <code>true</code> to flatten the list. The default is <code>false</code> </p>"""
    flattened_element: NotRequired[
        "capo_cloudwatch_logs.types.flattened_element.FlattenedElement"
    ]
    """<p>If you set <code>flatten</code> to <code>true</code>, use <code>flattenedElement</code> to specify which element, <code>first</code> or <code>last</code>, to keep. </p> <p>You must specify this parameter if <code>flatten</code> is <code>true</code> </p>"""

flatten instance-attribute

flatten: Flatten

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

flattened_element instance-attribute

flattened_element: NotRequired[FlattenedElement]

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

key instance-attribute

key: Key

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

source instance-attribute

source: Source

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

target instance-attribute

target: NotRequired[Target]

The key of the field that will hold the generated map

value_key instance-attribute

value_key: NotRequired[ValueKey]

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.