aws-cdk-lib.aws_logs.CfnSubscriptionFilterProps

interface CfnSubscriptionFilterProps

LanguageType name
.NETAmazon.CDK.AWS.Logs.CfnSubscriptionFilterProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslogs#CfnSubscriptionFilterProps
Javasoftware.amazon.awscdk.services.logs.CfnSubscriptionFilterProps
Pythonaws_cdk.aws_logs.CfnSubscriptionFilterProps
TypeScript aws-cdk-lib » aws_logs » CfnSubscriptionFilterProps

Properties for defining a CfnSubscriptionFilter.

Example

// 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';
const cfnSubscriptionFilterProps: logs.CfnSubscriptionFilterProps = {
  destinationArn: 'destinationArn',
  filterPattern: 'filterPattern',
  logGroupName: 'logGroupName',

  // the properties below are optional
  distribution: 'distribution',
  filterName: 'filterName',
  roleArn: 'roleArn',
};

Properties

NameTypeDescription
destinationArnstringThe Amazon Resource Name (ARN) of the destination.
filterPatternstringThe filtering expressions that restrict what gets delivered to the destination AWS resource.
logGroupNamestringThe log group to associate with the subscription filter.
distribution?stringThe method used to distribute log data to the destination, which can be either random or grouped by log stream.
filterName?stringThe name of the subscription filter.
roleArn?stringThe ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream.

destinationArn

Type: string

The Amazon Resource Name (ARN) of the destination.


filterPattern

Type: string

The filtering expressions that restrict what gets delivered to the destination AWS resource.

For more information about the filter pattern syntax, see Filter and Pattern Syntax .


logGroupName

Type: string

The log group to associate with the subscription filter.

All log events that are uploaded to this log group are filtered and delivered to the specified AWS resource if the filter pattern matches the log events.


distribution?

Type: string (optional)

The method used to distribute log data to the destination, which can be either random or grouped by log stream.


filterName?

Type: string (optional)

The name of the subscription filter.


roleArn?

Type: string (optional)

The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream.

You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.