interface SubscriptionFilterProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Logs.SubscriptionFilterProps |
Java | software.amazon.awscdk.services.logs.SubscriptionFilterProps |
Python | aws_cdk.aws_logs.SubscriptionFilterProps |
TypeScript (source) | @aws-cdk/aws-logs » SubscriptionFilterProps |
Properties for a SubscriptionFilter.
Example
import * as destinations from '@aws-cdk/aws-logs-destinations';
declare const fn: lambda.Function;
declare const logGroup: logs.LogGroup;
new logs.SubscriptionFilter(this, 'Subscription', {
logGroup,
destination: new destinations.LambdaDestination(fn),
filterPattern: logs.FilterPattern.allTerms("ERROR", "MainThread"),
});
Properties
Name | Type | Description |
---|---|---|
destination | ILog | The destination to send the filtered events to. |
filter | IFilter | Log events matching this pattern will be sent to the destination. |
log | ILog | The log group to create the subscription on. |
destination
Type:
ILog
The destination to send the filtered events to.
For example, a Kinesis stream or a Lambda function.
filterPattern
Type:
IFilter
Log events matching this pattern will be sent to the destination.
logGroup
Type:
ILog
The log group to create the subscription on.