ListToMap
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.
Contents
- key
-
The key of the field to be extracted as keys in the generated map
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Required: Yes
- source
-
The key in the log event that has a list of objects that will be converted to a map.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Required: Yes
- flatten
-
A Boolean value to indicate whether the list will be flattened into single items. Specify
trueto flatten the list. The default isfalseType: Boolean
Required: No
- flattenedElement
-
If you set
flattentotrue, useflattenedElementto specify which element,firstorlast, to keep.You must specify this parameter if
flattenistrueType: String
Valid Values:
first | lastRequired: No
- target
-
The key of the field that will hold the generated map
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Required: No
- valueKey
-
If this is specified, the values that you specify in this parameter will be extracted from the
sourceobjects 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.Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: