AWS::Logs::Transformer 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.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Flatten" :
Boolean
, "FlattenedElement" :String
, "Key" :String
, "Source" :String
, "Target" :String
, "ValueKey" :String
}
YAML
Flatten:
Boolean
FlattenedElement:String
Key:String
Source:String
Target:String
ValueKey:String
Properties
Flatten
-
A Boolean value to indicate whether the list will be flattened into single items. Specify
true
to flatten the list. The default isfalse
Required: No
Type: Boolean
Update requires: No interruption
FlattenedElement
-
If you set
flatten
totrue
, useflattenedElement
to specify which element,first
orlast
, to keep.You must specify this parameter if
flatten
istrue
Required: No
Type: String
Allowed values:
first | last
Update requires: No interruption
Key
-
The key of the field to be extracted as keys in the generated map
Required: Yes
Type: String
Pattern:
^.*[a-zA-Z0-9]+.*$
Update requires: No interruption
Source
-
The key in the log event that has a list of objects that will be converted to a map.
Required: Yes
Type: String
Pattern:
^.*[a-zA-Z0-9]+.*$
Update requires: No interruption
Target
-
The key of the field that will hold the generated map
Required: No
Type: String
Pattern:
^.*[a-zA-Z0-9]+.*$
Maximum:
128
Update requires: No interruption
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.Required: No
Type: String
Pattern:
^.*[a-zA-Z0-9]+.*$
Update requires: No interruption