DateTimeConverterProperty Struct
This processor converts a datetime string into a format that you specify.
For more information about this processor including examples, see datetimeConverter in the CloudWatch Logs User Guide.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
const dateTimeConverterProperty: logs.DateTimeConverterProperty = {
locale: 'locale',
matchPatterns: ['matchPatterns'],
source: 'source',
target: 'target',
// the properties below are optional
sourceTimezone: 'sourceTimezone',
targetFormat: 'targetFormat',
targetTimezone: 'targetTimezone',
};
Properties
The locale of the source field.
matchPatternsstring[]match_patternstyping.List[str]matchPatternsList<String>MatchPatternsstring[]MatchPatterns*[]*stringrequired#A list of patterns to match against the source field.
The key to apply the date conversion to.
sourceTimezoneoptionalstringsource_timezoneoptionalstrsourceTimezoneoptionalStringSourceTimezoneoptionalstringSourceTimezoneoptional*string= UTC#The time zone of the source field.
The JSON field to store the result in.
targetFormatoptionalstringtarget_formatoptionalstrtargetFormatoptionalStringTargetFormatoptionalstringTargetFormatoptional*string= "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"#The datetime format to use for the converted data in the target field.
targetTimezoneoptionalstringtarget_timezoneoptionalstrtargetTimezoneoptionalStringTargetTimezoneoptionalstringTargetTimezoneoptional*string= UTC#The time zone of the target field.