CfnSubscriptionFilterProps

class aws_cdk.aws_logs.CfnSubscriptionFilterProps(*, destination_arn, filter_pattern, log_group_name, 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.

  • 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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.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
    role_arn="roleArn"
)

Attributes

destination_arn

The Amazon Resource Name (ARN) of the destination.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-destinationarn

Return type

str

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-filterpattern

Return type

str

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-loggroupname

Return type

str

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-rolearn

Return type

Optional[str]