Experimental
@aws-cdk/aws-iot-actions-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
FirehosePutRecordActionProps Struct
Configuration properties of an action for the Amazon Data Firehose stream.
Example
ts
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
const bucket = new s3.Bucket(this, 'MyBucket');
const stream = new firehose.DeliveryStream(this, 'MyStream', {
destination: new firehose.S3Bucket(bucket),
});
const topicRule = new iot.TopicRule(this, 'TopicRule', {
sql: iot.IotSql.fromStringAsVer20160323("SELECT * FROM 'device/+/data'"),
actions: [
new actions.FirehosePutRecordAction(stream, {
batchMode: true,
recordSeparator: actions.FirehoseRecordSeparator.NEWLINE,
}),
],
});
Properties
batchModeoptionalbooleanbatch_modeoptionalboolbatchModeoptionalBooleanBatchModeoptionalboolBatchModeoptional*bool= false#Whether to deliver the Amazon 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.
recordSeparatoroptionalFirehoseRecordSeparatorrecord_separatoroptionalFirehoseRecordSeparatorrecordSeparatoroptionalFirehoseRecordSeparatorRecordSeparatoroptionalFirehoseRecordSeparatorRecordSeparatoroptionalFirehoseRecordSeparator#A character separator that will be used to separate records written to the Amazon Data Firehose stream.
Default: none -- the stream does not use a separator