KinesisDestination

class aws_cdk.aws_logs_destinations.KinesisDestination(stream, *, role=None)

Bases: object

Use a Kinesis stream as the destination for a log subscription.

ExampleMetadata:

infused

Example:

import aws_cdk.aws_logs_destinations as destinations
import aws_cdk.aws_kinesis as kinesis

# stream: kinesis.Stream
# log_group: logs.LogGroup


logs.SubscriptionFilter(self, "Subscription",
    log_group=log_group,
    destination=destinations.KinesisDestination(stream),
    filter_pattern=logs.FilterPattern.all_terms("ERROR", "MainThread"),
    filter_name="ErrorInMainThread",
    distribution=logs.Distribution.RANDOM
)
Parameters:
  • stream (IStream) – The Kinesis stream to use as destination.

  • role (Optional[IRole]) – The role to assume to write log events to the destination. Default: - A new Role is created

Methods

bind(scope, _source_log_group)

Return the properties required to send subscription events to this destination.

If necessary, the destination can use the properties of the SubscriptionFilter object itself to configure its permissions to allow the subscription to write to it.

The destination may reconfigure its own permissions in response to this function call.

Parameters:
Return type:

LogSubscriptionDestinationConfig