FirehosePutRecordActionProps

class aws_cdk.aws_iot_actions.FirehosePutRecordActionProps(*, role=None, batch_mode=None, record_separator=None)

Bases: CommonActionProps

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

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

  • batch_mode (Optional[bool]) – (experimental) Whether to deliver the Kinesis Data Firehose stream as a batch by using PutRecordBatch. When batchMode is true and the rule’s SQL statement evaluates to an Array, each Array element forms one record in the PutRecordBatch request. The resulting array can’t have more than 500 records. Default: false

  • record_separator (Optional[FirehoseRecordSeparator]) – (experimental) A character separator that will be used to separate records written to the Kinesis Data Firehose stream. Default: - none – the stream does not use a separator

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_kinesisfirehose as firehose
import aws_cdk.aws_kinesisfirehose_destinations as destinations


bucket = s3.Bucket(self, "MyBucket")
stream = firehose.DeliveryStream(self, "MyStream",
    destinations=[destinations.S3Bucket(bucket)]
)

topic_rule = iot.TopicRule(self, "TopicRule",
    sql=iot.IotSql.from_string_as_ver20160323("SELECT * FROM 'device/+/data'"),
    actions=[
        actions.FirehosePutRecordAction(stream,
            batch_mode=True,
            record_separator=actions.FirehoseRecordSeparator.NEWLINE
        )
    ]
)

Attributes

batch_mode

(experimental) Whether to deliver the Kinesis Data Firehose stream as a batch by using PutRecordBatch.

When batchMode is true and the rule’s SQL statement evaluates to an Array, each Array element forms one record in the PutRecordBatch request. The resulting array can’t have more than 500 records.

Default:

false

Stability:

experimental

record_separator

(experimental) A character separator that will be used to separate records written to the Kinesis Data Firehose stream.

Default:
  • none – the stream does not use a separator

Stability:

experimental

role

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

Default:

a new role will be created

Stability:

experimental