Class Transformer

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.logs.Transformer
All Implemented Interfaces:
IEnvironmentAware, IResource, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.133.0 (build 0f43e37)", date="2026-06-16T16:14:28.101Z") @Stability(Stable) public class Transformer extends Resource
Represent the L2 construct for the AWS::Logs::Transformer CloudFormation resource.

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();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Stable) public static final String PROPERTY_INJECTION_ID
      The property injection ID for this resource class.

      Used by the CDK frameworks for managing resource lifecycle.

  • Constructor Details

    • Transformer

      protected Transformer(software.amazon.jsii.JsiiObjectRef objRef)
    • Transformer

      protected Transformer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Transformer

      @Stability(Stable) public Transformer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TransformerProps props)
      The Transformer L2 construct that represents AWS::Logs::Transformer CFN resource.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.