interface ListToMapProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.Logs.Mixins.CfnTransformerPropsMixin.ListToMapProperty |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awslogs/mixins#CfnTransformerPropsMixin_ListToMapProperty |
Java | software.amazon.awscdk.mixins.preview.services.logs.mixins.CfnTransformerPropsMixin.ListToMapProperty |
Python | aws_cdk.mixins_preview.aws_logs.mixins.CfnTransformerPropsMixin.ListToMapProperty |
TypeScript | @aws-cdk/mixins-preview » aws_logs » mixins » CfnTransformerPropsMixin » ListToMapProperty |
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 .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins as logs_mixins } from '@aws-cdk/mixins-preview/aws-logs';
const listToMapProperty: logs_mixins.CfnTransformerPropsMixin.ListToMapProperty = {
flatten: false,
flattenedElement: 'flattenedElement',
key: 'key',
source: 'source',
target: 'target',
valueKey: 'valueKey',
};
Properties
| Name | Type | Description |
|---|---|---|
| flatten? | boolean | IResolvable | A Boolean value to indicate whether the list will be flattened into single items. |
| flattened | string | If you set flatten to true , use flattenedElement to specify which element, first or last , to keep. |
| key? | string | The key of the field to be extracted as keys in the generated map. |
| source? | string | The key in the log event that has a list of objects that will be converted to a map. |
| target? | string | The key of the field that will hold the generated map. |
| value | string | 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. |
flatten?
Type:
boolean | IResolvable
(optional)
A Boolean value to indicate whether the list will be flattened into single items.
Specify true to flatten the list. The default is false
flattenedElement?
Type:
string
(optional)
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?
Type:
string
(optional)
The key of the field to be extracted as keys in the generated map.
source?
Type:
string
(optional)
The key in the log event that has a list of objects that will be converted to a map.
target?
Type:
string
(optional)
The key of the field that will hold the generated map.
valueKey?
Type:
string
(optional)
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.

.NET
Go
Java
Python
TypeScript