Class JsonMutatorProcessor
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.logs.JsonMutatorProcessor
- All Implemented Interfaces:
IProcessor,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:13.219Z")
@Stability(Stable)
public class JsonMutatorProcessor
extends software.amazon.jsii.JsiiObject
implements IProcessor
Processor for JSON mutation operations.
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 JSON mutator processor.protectedJsonMutatorProcessor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedJsonMutatorProcessor(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptiongetType()The type of JSON mutation operation.voidsetType(JsonMutatorType value) The type of JSON mutation operation.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
-
JsonMutatorProcessor
protected JsonMutatorProcessor(software.amazon.jsii.JsiiObjectRef objRef) -
JsonMutatorProcessor
protected JsonMutatorProcessor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
JsonMutatorProcessor
Creates a new JSON mutator processor.- Parameters:
props- This parameter is required.
-
-
Method Details
-
getType
The type of JSON mutation operation. -
setType
The type of JSON mutation operation.
-