Class ParserProcessor
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.logs.ParserProcessor
- All Implemented Interfaces:
IProcessor,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:41.784Z")
@Stability(Stable)
public class ParserProcessor
extends software.amazon.jsii.JsiiObject
implements IProcessor
Parser processor for common data formats.
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();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.logs.IProcessor
IProcessor.Jsii$Default, IProcessor.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates a new parser processor.protectedParserProcessor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedParserProcessor(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptiongetType()The type of parser.voidsetType(ParserProcessorType value) The type of parser.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ParserProcessor
protected ParserProcessor(software.amazon.jsii.JsiiObjectRef objRef) -
ParserProcessor
protected ParserProcessor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ParserProcessor
Creates a new parser processor.- Parameters:
props- This parameter is required.
-
-
Method Details
-
getType
The type of parser. -
setType
The type of parser.
-