KinesisPutRecordActionProps

class aws_cdk.aws_iot_actions.KinesisPutRecordActionProps(*, role=None, partition_key)

Bases: CommonActionProps

(experimental) Configuration properties of an action for the Kinesis Data stream.

Parameters:
  • role (Optional[IRole]) – (experimental) The IAM role that allows access to AWS service. Default: a new role will be created

  • partition_key (str) – (experimental) The partition key used to determine to which shard the data is written. The partition key is usually composed of an expression (for example, ${topic()} or ${timestamp()}).

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_kinesis as kinesis


stream = kinesis.Stream(self, "MyStream")

topic_rule = iot.TopicRule(self, "TopicRule",
    sql=iot.IotSql.from_string_as_ver20160323("SELECT * FROM 'device/+/data'"),
    actions=[
        actions.KinesisPutRecordAction(stream,
            partition_key="${newuuid()}"
        )
    ]
)

Attributes

partition_key

(experimental) The partition key used to determine to which shard the data is written.

The partition key is usually composed of an expression (for example, ${topic()} or ${timestamp()}).

See:

https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecord.html#API_PutRecord_RequestParameters

Stability:

experimental

role

(experimental) The IAM role that allows access to AWS service.

Default:

a new role will be created

Stability:

experimental