interface TransformerProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Logs.TransformerProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awslogs#TransformerProps |
![]() | software.amazon.awscdk.services.logs.TransformerProps |
![]() | aws_cdk.aws_logs.TransformerProps |
![]() | aws-cdk-lib » aws_logs » TransformerProps |
The Resource properties for AWS::Logs::Transformer resource.
This interface defines all configuration options for the CfnTransformer construct.
Example
// Create a log group
const logGroup = new logs.LogGroup(this, 'MyLogGroup');
// Create a JSON parser processor
const jsonParser = new logs.ParserProcessor({
type: logs.ParserProcessorType.JSON
});
// Create a processor to add keys
const addKeysProcessor = new logs.JsonMutatorProcessor({
type: logs.JsonMutatorType.ADD_KEYS,
addKeysOptions: {
entries: [{
key: 'metadata.transformed_in',
value: 'CloudWatchLogs'
}]
}
});
// Create a transformer with these processors
new logs.Transformer(this, 'Transformer', {
transformerName: 'MyTransformer',
logGroup: logGroup,
transformerConfig: [jsonParser, addKeysProcessor]
});
Properties
Name | Type | Description |
---|---|---|
log | ILog | Existing log group that you want to associate with this transformer. |
transformer | IProcessor [] | List of processors in a transformer. |
transformer | string | Name of the transformer. |
logGroup
Type:
ILog
Existing log group that you want to associate with this transformer.
transformerConfig
Type:
IProcessor
[]
List of processors in a transformer.
transformerName
Type:
string
Name of the transformer.