@aws-cdk_aws-iot-actions-alpha.IotEventsPutMessageActionProps

interface IotEventsPutMessageActionProps ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.IoT.Actions.Alpha.IotEventsPutMessageActionProps
Gogithub.com/aws/aws-cdk-go/awscdkiotactionsalpha/v2#IotEventsPutMessageActionProps
Javasoftware.amazon.awscdk.services.iot.actions.alpha.IotEventsPutMessageActionProps
Pythonaws_cdk.aws_iot_actions_alpha.IotEventsPutMessageActionProps
TypeScript (source)@aws-cdk/aws-iot-actions-alpha ยป IotEventsPutMessageActionProps

Configuration properties of an action for the IoT Events.

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
    }),
  ],
});

Properties

NameTypeDescription
batchMode?๐Ÿ”นbooleanWhether to process the event actions as a batch.
messageId?๐Ÿ”นstringThe ID of the message.
role?๐Ÿ”นIRoleThe IAM role that allows access to AWS service.

batchMode?๐Ÿ”น

Type: boolean (optional, default: false)

Whether to process the event actions as a batch.

When batchMode is true, you can't specify a messageId.

When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is treated as a separate message when Events by calling BatchPutMessage. The resulting array can't have more than 10 messages.


messageId?๐Ÿ”น

Type: string (optional, default: none -- a new UUID value will be assigned)

The ID of the message.

When batchMode is true, you can't specify a messageId--a new UUID value will be assigned. Assign a value to this property to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.


role?๐Ÿ”น

Type: IRole (optional, default: a new role will be created)

The IAM role that allows access to AWS service.