class IotEventsPutMessageAction
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.IoT.Actions.Alpha.IotEventsPutMessageAction |
![]() | github.com/aws/aws-cdk-go/awscdkiotactionsalpha/v2#IotEventsPutMessageAction |
![]() | software.amazon.awscdk.services.iot.actions.alpha.IotEventsPutMessageAction |
![]() | aws_cdk.aws_iot_actions_alpha.IotEventsPutMessageAction |
![]() | @aws-cdk/aws-iot-actions-alpha » IotEventsPutMessageAction |
Implements
IAction
The action to put the message from an MQTT message to the IoT Events input.
Example
import * as iotevents from '@aws-cdk/aws-iotevents-alpha';
import * as iam from 'aws-cdk-lib/aws-iam';
declare const role: iam.IRole;
const input = new iotevents.Input(this, 'MyInput', {
attributeJsonPaths: ['payload.temperature', 'payload.transactionId'],
});
const topicRule = new iot.TopicRule(this, 'TopicRule', {
sql: iot.IotSql.fromStringAsVer20160323(
"SELECT * FROM 'device/+/data'",
),
actions: [
new actions.IotEventsPutMessageAction(input, {
batchMode: true, // optional property, default is 'false'
messageId: '${payload.transactionId}', // optional property, default is a new UUID
role: role, // optional property, default is a new UUID
}),
],
});
Initializer
new IotEventsPutMessageAction(input: IInput, props?: IotEventsPutMessageActionProps)
Parameters
- input
IInput
— The IoT Events input to put messages. - props
Iot
— Optional properties to not use default.Events Put Message Action Props