SubscriptionFilterOptions
- class aws_cdk.aws_logs.SubscriptionFilterOptions(*, destination, filter_pattern, distribution=None, filter_name=None)
Bases:
object
Properties for a new SubscriptionFilter created from a LogGroup.
- Parameters:
destination (
ILogSubscriptionDestination
) – The destination to send the filtered events to. For example, a Kinesis stream or a Lambda function.filter_pattern (
IFilterPattern
) – Log events matching this pattern will be sent to the destination.distribution (
Optional
[Distribution
]) – The method used to distribute log data to the destination. This property can only be used with KinesisDestination. Default: Distribution.BY_LOG_STREAMfilter_name (
Optional
[str
]) – The name of the subscription filter. Default: Automatically generated
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_logs as logs # filter_pattern: logs.IFilterPattern # log_subscription_destination: logs.ILogSubscriptionDestination subscription_filter_options = logs.SubscriptionFilterOptions( destination=log_subscription_destination, filter_pattern=filter_pattern, # the properties below are optional distribution=logs.Distribution.BY_LOG_STREAM, filter_name="filterName" )
Attributes
- destination
The destination to send the filtered events to.
For example, a Kinesis stream or a Lambda function.
- distribution
The method used to distribute log data to the destination.
This property can only be used with KinesisDestination.
- Default:
Distribution.BY_LOG_STREAM
- filter_name
The name of the subscription filter.
- Default:
Automatically generated
- filter_pattern
Log events matching this pattern will be sent to the destination.