Interface IotEventsPutMessageActionProps

All Superinterfaces:
CommonActionProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
IotEventsPutMessageActionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:11.973Z") @Stability(Experimental) public interface IotEventsPutMessageActionProps extends software.amazon.jsii.JsiiSerializable, CommonActionProps
(experimental) Configuration properties of an action for the IoT Events.

Example:

 import software.amazon.awscdk.services.iotevents.alpha.*;
 import software.amazon.awscdk.services.iam.*;
 IRole role;
 Input input = Input.Builder.create(this, "MyInput")
         .attributeJsonPaths(List.of("payload.temperature", "payload.transactionId"))
         .build();
 TopicRule topicRule = TopicRule.Builder.create(this, "TopicRule")
         .sql(IotSql.fromStringAsVer20160323("SELECT * FROM 'device/+/data'"))
         .actions(List.of(
             IotEventsPutMessageAction.Builder.create(input)
                     .batchMode(true) // optional property, default is 'false'
                     .messageId("${payload.transactionId}") // optional property, default is a new UUID
                     .role(role)
                     .build()))
         .build();
 
  • Method Details

    • getBatchMode

      @Stability(Experimental) @Nullable default Boolean getBatchMode()
      (experimental) 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.

      Default: false

    • getMessageId

      @Stability(Experimental) @Nullable default String getMessageId()
      (experimental) 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.

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

    • builder

      @Stability(Experimental) static IotEventsPutMessageActionProps.Builder builder()
      Returns:
      a IotEventsPutMessageActionProps.Builder of IotEventsPutMessageActionProps