Class TransformerProps
The Resource properties for AWS::Logs::Transformer resource.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class TransformerProps : ITransformerProps
Syntax (vb)
Public Class TransformerProps Implements ITransformerProps
Remarks
This interface defines all configuration options for the CfnTransformer construct.
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
TransformerProps() | The Resource properties for AWS::Logs::Transformer resource. |
Properties
LogGroup | Existing log group that you want to associate with this transformer. |
TransformerConfig | List of processors in a transformer. |
TransformerName | Name of the transformer. |
Constructors
TransformerProps()
The Resource properties for AWS::Logs::Transformer resource.
public TransformerProps()
Remarks
This interface defines all configuration options for the CfnTransformer construct.
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 }
});
Properties
LogGroup
Existing log group that you want to associate with this transformer.
public ILogGroup LogGroup { get; set; }
Property Value
Remarks
This interface defines all configuration options for the CfnTransformer construct.
ExampleMetadata: infused
TransformerConfig
List of processors in a transformer.
public IProcessor[] TransformerConfig { get; set; }
Property Value
Remarks
This interface defines all configuration options for the CfnTransformer construct.
ExampleMetadata: infused
TransformerName
Name of the transformer.
public string TransformerName { get; set; }
Property Value
Remarks
This interface defines all configuration options for the CfnTransformer construct.
ExampleMetadata: infused