interface FirehosePutRecordActionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoT.Actions.FirehosePutRecordActionProps |
Java | software.amazon.awscdk.services.iot.actions.FirehosePutRecordActionProps |
Python | aws_cdk.aws_iot_actions.FirehosePutRecordActionProps |
TypeScript (source) | @aws-cdk/aws-iot-actions » FirehosePutRecordActionProps |
Configuration properties of an action for the Kinesis Data Firehose stream.
Example
import * as firehose from '@aws-cdk/aws-kinesisfirehose';
import * as destinations from '@aws-cdk/aws-kinesisfirehose-destinations';
const bucket = new s3.Bucket(this, 'MyBucket');
const stream = new firehose.DeliveryStream(this, 'MyStream', {
destinations: [new destinations.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
Name | Type | Description |
---|---|---|
batch | boolean | Whether to deliver the Kinesis Data Firehose stream as a batch by using PutRecordBatch . |
record | Firehose | A character separator that will be used to separate records written to the Kinesis Data Firehose stream. |
role? | IRole | The IAM role that allows access to AWS service. |
batchMode?
Type:
boolean
(optional, default: false)
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.
recordSeparator?
Type:
Firehose
(optional, default: none -- the stream does not use a separator)
A character separator that will be used to separate records written to the Kinesis Data Firehose stream.
role?
Type:
IRole
(optional, default: a new role will be created)
The IAM role that allows access to AWS service.