CfnSubscriptionFilterProps
- class aws_cdk.aws_logs.CfnSubscriptionFilterProps(*, destination_arn, filter_pattern, log_group_name, distribution=None, filter_name=None, role_arn=None)
Bases:
object
Properties for defining a
CfnSubscriptionFilter
.- Parameters:
destination_arn (
str
) – The Amazon Resource Name (ARN) of the destination.filter_pattern (
str
) – 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 .log_group_name (
str
) – 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 (
Optional
[str
]) – The method used to distribute log data to the destination, which can be either random or grouped by log stream.filter_name (
Optional
[str
]) – The name of the subscription filter.role_arn (
Optional
[str
]) – 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.
- See:
- 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 cfn_subscription_filter_props = logs.CfnSubscriptionFilterProps( destination_arn="destinationArn", filter_pattern="filterPattern", log_group_name="logGroupName", # the properties below are optional distribution="distribution", filter_name="filterName", role_arn="roleArn" )
Attributes
- destination_arn
The Amazon Resource Name (ARN) of the destination.
- distribution
The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- filter_name
The name of the subscription filter.
- filter_pattern
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 .
- log_group_name
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.
- role_arn
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.