Class Transformer
Represent the L2 construct for the AWS::Logs::Transformer CloudFormation resource.
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Transformer : Resource, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class Transformer Inherits Resource Implements IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
ExampleMetadata: infused
Examples
// Create a log group
var logGroup = new LogGroup(this, "MyLogGroup");
// Create a JSON parser processor
var jsonParser = new ParserProcessor(new ParserProcessorProps {
Type = ParserProcessorType.JSON
});
// Create a processor to add keys
var addKeysProcessor = new JsonMutatorProcessor(new JsonMutatorProps {
Type = JsonMutatorType.ADD_KEYS,
AddKeysOptions = new AddKeysProperty {
Entries = new [] { new AddKeyEntryProperty {
Key = "metadata.transformed_in",
Value = "CloudWatchLogs"
} }
}
});
// Create a transformer with these processors
// Create a transformer with these processors
new Transformer(this, "Transformer", new TransformerProps {
TransformerName = "MyTransformer",
LogGroup = logGroup,
TransformerConfig = new [] { jsonParser, addKeysProcessor }
});
Synopsis
Constructors
| Transformer(Construct, string, ITransformerProps) | The Transformer L2 construct that represents AWS::Logs::Transformer CFN resource. |
Properties
| PROPERTY_INJECTION_ID | The property injection ID for this resource class. |
Constructors
Transformer(Construct, string, ITransformerProps)
The Transformer L2 construct that represents AWS::Logs::Transformer CFN resource.
public Transformer(Construct scope, string id, ITransformerProps props)
Parameters
- scope Construct
- id string
- props ITransformerProps
Remarks
ExampleMetadata: infused
Properties
PROPERTY_INJECTION_ID
The property injection ID for this resource class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Used by the CDK frameworks for managing resource lifecycle.
Implements
Constructs.IConstruct
Constructs.IDependable