Skip to content
v2.274.0

CsvProperty Struct ​

The CSV processor parses comma-separated values (CSV) from the log events into columns.

For more information about this processor including examples, see csv 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 csvProperty: logs.CsvProperty = {
  columns: ['columns'],
  delimiter: logs.DelimiterCharacter.COMMA,
  quoteCharacter: logs.QuoteCharacter.DOUBLE_QUOTE,
  source: 'source',
};

Properties ​

columnsstring[]columnstyping.List[str]columnsList<String>Columnsstring[]Columns*[]*string= Column names ([column_1, column_…#
An array of names to use for the columns in the transformed log event.
default

Default: Column names ([column_1, column_2 ...]) are used

delimiterDelimiterCharacterdelimiterDelimiterCharacterdelimiterDelimiterCharacterDelimiterDelimiterCharacterDelimiterDelimiterCharacter= DelimiterCharacter.COMMA#
Character used to separate each column in the original comma-separated value log event.
quoteCharacterQuoteCharacterquote_characterQuoteCharacterquoteCharacterQuoteCharacterQuoteCharacterQuoteCharacterQuoteCharacterQuoteCharacter= QuoteCharacter.DOUBLE_QUOTE#
Character used as a text qualifier for a single column of data.
sourcestringsourcestrsourceStringSourcestringSource*string= '@message'#
The path to the field in the log event that has the comma separated values to be parsed.