CfnSubscriptionFilterProps

class aws_cdk.aws_logs.CfnSubscriptionFilterProps(*, destination_arn, filter_pattern, log_group_name, apply_on_transformed_logs=None, distribution=None, emit_system_fields=None, field_selection_criteria=None, filter_name=None, role_arn=None)

Bases: object

Properties for defining a CfnSubscriptionFilter.

Parameters:
  • destination_arn (Union[str, IStreamRef, IDeliveryStreamRef, IFunctionRef]) – 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 (Union[str, ILogGroupRef]) – 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.

  • apply_on_transformed_logs (Union[bool, IResolvable, None]) – This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer . If this value is true , the subscription filter is applied on the transformed version of the log events instead of the original ingested 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.

  • emit_system_fields (Optional[Sequence[str]]) – The list of system fields that are included in the log events sent to the subscription destination. Returns the emitSystemFields value if it was specified when the subscription filter was created.

  • field_selection_criteria (Optional[str]) – The filter expression that specifies which log events are processed by this subscription filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the subscription filter was created.

  • filter_name (Optional[str]) – The name of the subscription filter.

  • role_arn (Union[str, IRoleRef, None]) – 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:

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.
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
    apply_on_transformed_logs=False,
    distribution="distribution",
    emit_system_fields=["emitSystemFields"],
    field_selection_criteria="fieldSelectionCriteria",
    filter_name="filterName",
    role_arn="roleArn"
)

Attributes

apply_on_transformed_logs

This parameter is valid only for log groups that have an active log transformer.

For more information about log transformers, see PutTransformer .

If this value is true , the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.

See:

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

destination_arn

The Amazon Resource Name (ARN) of the destination.

See:

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

distribution

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

See:

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

emit_system_fields

The list of system fields that are included in the log events sent to the subscription destination.

Returns the emitSystemFields value if it was specified when the subscription filter was created.

See:

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

field_selection_criteria

The filter expression that specifies which log events are processed by this subscription filter based on system fields.

Returns the fieldSelectionCriteria value if it was specified when the subscription filter was created.

See:

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

filter_name

The name of the subscription filter.

See:

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

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 .

See:

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

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.

See:

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

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.

See:

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