# IotAnalyticsActionProperty

Sends message data to an AWS IoT Analytics channel.

- 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 iotAnalyticsActionProperty: iot.CfnTopicRule.IotAnalyticsActionProperty = {
  channelName: 'channelName',
  roleArn: 'roleArn',

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

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_analytics_action_property = iot.CfnTopicRule.IotAnalyticsActionProperty(
    channel_name="channelName",
    role_arn="roleArn",

    # the properties below are optional
    batch_mode=False
)
```

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.*;

IotAnalyticsActionProperty iotAnalyticsActionProperty = IotAnalyticsActionProperty.builder()
        .channelName("channelName")
        .roleArn("roleArn")

        // the properties below are optional
        .batchMode(false)
        .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 iotAnalyticsActionProperty = new IotAnalyticsActionProperty {
    ChannelName = "channelName",
    RoleArn = "roleArn",

    // the properties below are optional
    BatchMode = false
};
```

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"

iotAnalyticsActionProperty := &IotAnalyticsActionProperty{
	ChannelName: jsii.String("channelName"),
	RoleArn: jsii.String("roleArn"),

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

## Properties

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

  When `batchMode` is `true` and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by [`BatchPutMessage`](https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html) The resulting array can't have more than 100 messages.

- `channelName`: string (required) — The name of the IoT Analytics channel to which message data will be sent.

- `roleArn`: string (required) — The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).
