class ParserProcessor
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Logs.ParserProcessor |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awslogs#ParserProcessor |
![]() | software.amazon.awscdk.services.logs.ParserProcessor |
![]() | aws_cdk.aws_logs.ParserProcessor |
![]() | aws-cdk-lib » aws_logs » ParserProcessor |
Implements
IProcessor
Parser processor for common data formats.
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]
});
Initializer
new ParserProcessor(props: ParserProcessorProps)
Parameters
- props
Parser
Processor Props
Creates a new parser processor.
Properties
Name | Type | Description |
---|---|---|
type | Parser | The type of parser. |
type
Type:
Parser
The type of parser.