DateTimeConverter - Amazon CloudWatch Logs
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DateTimeConverter

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.

Contents

matchPatterns

A list of patterns to match against the source field.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 5 items.

Length Constraints: Minimum length of 1.

Required: Yes

source

The key to apply the date conversion to.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

target

The JSON field to store the result in.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

locale

The locale of the source field. If you omit this, the default of locale.ROOT is used.

Type: String

Length Constraints: Minimum length of 1.

Required: No

sourceTimezone

The time zone of the source field. If you omit this, the default used is the UTC zone.

Type: String

Length Constraints: Minimum length of 1.

Required: No

targetFormat

The datetime format to use for the converted data in the target field.

If you omit this, the default of yyyy-MM-dd'T'HH:mm:ss.SSS'Z is used.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: No

targetTimezone

The time zone of the target field. If you omit this, the default used is the UTC zone.

Type: String

Length Constraints: Minimum length of 1.

Required: No

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: