Skip to content
v2.274.0

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 ​

localestringlocalestrlocaleStringLocalestringLocale*stringrequired#
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.
sourcestringsourcestrsourceStringSourcestringSource*stringrequired#
The key to apply the date conversion to.
sourceTimezoneoptionalstringsource_timezoneoptionalstrsourceTimezoneoptionalStringSourceTimezoneoptionalstringSourceTimezoneoptional*string= UTC#
The time zone of the source field.
targetstringtargetstrtargetStringTargetstringTarget*stringrequired#
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.