class FirehosePutRecordAction
This page is available in another version. Click here for the v2 documentation.
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.IoT.Actions.FirehosePutRecordAction |
![]() | software.amazon.awscdk.services.iot.actions.FirehosePutRecordAction |
![]() | aws_cdk.aws_iot_actions.FirehosePutRecordAction |
![]() | @aws-cdk/aws-iot-actions » FirehosePutRecordAction |
Implements
IAction
The action to put the record from an MQTT message to 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,
}),
],
});
Initializer
new FirehosePutRecordAction(stream: IDeliveryStream, props?: FirehosePutRecordActionProps)
Parameters
- stream
IDelivery
— The Kinesis Data Firehose stream to which to put records.Stream - props
Firehose
— Optional properties to not use default.Put Record Action Props
Methods
Name | Description |
---|---|
bind(rule) | Returns the topic rule action specification. |
bind(rule)
public bind(rule: ITopicRule): ActionConfig
Parameters
- rule
ITopic
Rule
Returns
Returns the topic rule action specification.