# SubscriptionFilterOptions

Properties for a new SubscriptionFilter created from a LogGroup.

- Source: [`aws-logs/lib/log-group.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-logs/lib/log-group.ts#L781)
- Type last changed: v2.145.0 · 7 Jun 2024

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';

declare const filterPattern: logs.IFilterPattern;
declare const logSubscriptionDestination: logs.ILogSubscriptionDestination;
const subscriptionFilterOptions: logs.SubscriptionFilterOptions = {
  destination: logSubscriptionDestination,
  filterPattern: filterPattern,

  // the properties below are optional
  distribution: logs.Distribution.BY_LOG_STREAM,
  filterName: 'filterName',
};
```

## Properties

- `destination`: [ILogSubscriptionDestination](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogSubscriptionDestination.html) (required) — The destination to send the filtered events to.

  For example, a Kinesis stream or a Lambda function.

- `distribution`: [Distribution](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.Distribution.html) = Distribution.BY_LOG_STREAM — The method used to distribute log data to the destination.

  This property can only be used with KinesisDestination.

- `filterName`: string — The name of the subscription filter.

  **Default:** Automatically generated

- `filterPattern`: [IFilterPattern](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.IFilterPattern.html) (required) — Log events matching this pattern will be sent to the destination.
