KinesisStream

class aws_cdk.aws_events_targets.KinesisStream(stream, *, message=None, partition_key_path=None)

Bases: object

Use a Kinesis Stream as a target for AWS CloudWatch event rules.

Example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
# put to a Kinesis stream every time code is committed
# to a CodeCommit repository
repository.on_commit(targets.KinesisStream(stream))
__init__(stream, *, message=None, partition_key_path=None)
Parameters
  • stream (IStream) –

  • message (Optional[RuleTargetInput]) – The message to send to the stream. Must be a valid JSON text passed to the target stream. Default: - the entire CloudWatch event

  • partition_key_path (Optional[str]) – Partition Key Path for records sent to this stream. Default: - eventId as the partition key

Return type

None

Methods

bind(_rule, _id=None)

Returns a RuleTarget that can be used to trigger this Kinesis Stream as a result from a CloudWatch event.

Parameters
  • _rule (IRule) –

  • _id (Optional[str]) –

Return type

RuleTargetConfig