Interface ParserProcessorProps

All Superinterfaces:
BaseProcessorProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ParserProcessorProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-07-29T17:51:03.405Z") @Stability(Stable) public interface ParserProcessorProps extends software.amazon.jsii.JsiiSerializable, BaseProcessorProps
Properties for creating configurable parser processors.

Example:

 // Create a log group
 LogGroup logGroup = new LogGroup(this, "MyLogGroup");
 // Create a JSON parser processor
 ParserProcessor jsonParser = ParserProcessor.Builder.create()
         .type(ParserProcessorType.JSON)
         .build();
 // Create a processor to add keys
 JsonMutatorProcessor addKeysProcessor = JsonMutatorProcessor.Builder.create()
         .type(JsonMutatorType.ADD_KEYS)
         .addKeysOptions(AddKeysProperty.builder()
                 .entries(List.of(AddKeyEntryProperty.builder()
                         .key("metadata.transformed_in")
                         .value("CloudWatchLogs")
                         .build()))
                 .build())
         .build();
 // Create a transformer with these processors
 // Create a transformer with these processors
 Transformer.Builder.create(this, "Transformer")
         .transformerName("MyTransformer")
         .logGroup(logGroup)
         .transformerConfig(List.of(jsonParser, addKeysProcessor))
         .build();
 
  • Method Details

    • getType

      @Stability(Stable) @NotNull ParserProcessorType getType()
      The type of parser processor.
    • getCsvOptions

      @Stability(Stable) @Nullable default CsvProperty getCsvOptions()
      Options for CSV parser.

      Required when type is CSV.

      Default: - No CSV parser is created if props not set

    • getGrokOptions

      @Stability(Stable) @Nullable default GrokProperty getGrokOptions()
      Options for Grok parser.

      Required when type is GROK.

      Default: - No Grok parser is created if props not set

    • getJsonOptions

      @Stability(Stable) @Nullable default ParseJSONProperty getJsonOptions()
      Options for JSON parser.

      Required when type is JSON.

      Default: - No JSON parser is created if props not set

    • getKeyValueOptions

      @Stability(Stable) @Nullable default ParseKeyValueProperty getKeyValueOptions()
      Options for key-value parser.

      Required when type is KEY_VALUE.

      Default: - No key-value parser is created if props not set

    • getParseToOCSFOptions

      @Stability(Stable) @Nullable default ParseToOCSFProperty getParseToOCSFOptions()
      Options for ParseToOCSF parser.

      Required when type is set to OCSF

      Default: - no OCSF parser is created.

    • builder

      @Stability(Stable) static ParserProcessorProps.Builder builder()
      Returns:
      a ParserProcessorProps.Builder of ParserProcessorProps