> **Experimental**
>
> `@aws-cdk/aws-iot-actions-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# IotEventsPutMessageActionProps

Configuration properties of an action for the IoT Events.

Extends: IotEventsPutMessageActionProps
Extends: CommonActionProps
Used as props by: IotEventsPutMessageAction

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/iotevents-put-message-action.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-iot-actions-alpha/lib/iotevents-put-message-action.ts#L12)

## Example

```ts
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

- `batchMode`: boolean = 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`: string — The ID of the message.

  **Default:** none -- a new UUID value will be assigned

  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`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role that allows access to AWS service.

  **Default:** a new role will be created
