# IotEventsActionProperty

Sends an input to an AWS IoT Events detector.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const iotEventsActionProperty: iot.CfnTopicRule.IotEventsActionProperty = {
  inputName: 'inputName',
  roleArn: 'roleArn',

  // the properties below are optional
  batchMode: false,
  messageId: 'messageId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

iot_events_action_property = iot.CfnTopicRule.IotEventsActionProperty(
    input_name="inputName",
    role_arn="roleArn",

    # the properties below are optional
    batch_mode=False,
    message_id="messageId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;

IotEventsActionProperty iotEventsActionProperty = IotEventsActionProperty.builder()
        .inputName("inputName")
        .roleArn("roleArn")

        // the properties below are optional
        .batchMode(false)
        .messageId("messageId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;

var iotEventsActionProperty = new IotEventsActionProperty {
    InputName = "inputName",
    RoleArn = "roleArn",

    // the properties below are optional
    BatchMode = false,
    MessageId = "messageId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

iotEventsActionProperty := &IotEventsActionProperty{
	InputName: jsii.String("inputName"),
	RoleArn: jsii.String("roleArn"),

	// the properties below are optional
	BatchMode: jsii.Boolean(false),
	MessageId: jsii.String("messageId"),
}
```

## Properties

- `batchMode`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether to process the event actions as a batch. The default value is `false` .

  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`](https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html) . The resulting array can't have more than 10 messages.

- `inputName`: string (required) — The name of the AWS IoT Events input.

- `messageId`: string — The ID of the message. The default `messageId` is a new UUID value.

  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.

- `roleArn`: string (required) — The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector.

  ("Action":"iotevents:BatchPutMessage").
