Class: AWSCDK::IoT::CfnTopicRule::IotAnalyticsActionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_topic_rule.rb

Overview

Sends message data to an AWS IoT Analytics channel.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel_name:, role_arn:, batch_mode: nil) ⇒ IotAnalyticsActionProperty

Returns a new instance of IotAnalyticsActionProperty.

Parameters:

  • channel_name (String)

    The name of the IoT Analytics channel to which message data will be sent.

  • role_arn (String)

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

  • batch_mode (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Whether to process the action as a batch. The default value is false .



1735
1736
1737
1738
1739
1740
1741
1742
# File 'io_t/cfn_topic_rule.rb', line 1735

def initialize(channel_name:, role_arn:, batch_mode: nil)
  @channel_name = channel_name
  Jsii::Type.check_type(@channel_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "channelName")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @batch_mode = batch_mode
  Jsii::Type.check_type(@batch_mode, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "batchMode") unless @batch_mode.nil?
end

Instance Attribute Details

#batch_modeBoolean, ... (readonly)

Whether to process the action as a batch. The default value is false .

When batch_mode is true and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by BatchPutMessage The resulting array can't have more than 100 messages.



1760
1761
1762
# File 'io_t/cfn_topic_rule.rb', line 1760

def batch_mode
  @batch_mode
end

#channel_nameString (readonly)

The name of the IoT Analytics channel to which message data will be sent.



1748
1749
1750
# File 'io_t/cfn_topic_rule.rb', line 1748

def channel_name
  @channel_name
end

#role_arnString (readonly)

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



1753
1754
1755
# File 'io_t/cfn_topic_rule.rb', line 1753

def role_arn
  @role_arn
end

Class Method Details

.jsii_propertiesObject



1762
1763
1764
1765
1766
1767
1768
# File 'io_t/cfn_topic_rule.rb', line 1762

def self.jsii_properties
  {
    :channel_name => "channelName",
    :role_arn => "roleArn",
    :batch_mode => "batchMode",
  }
end

Instance Method Details

#to_jsiiObject



1770
1771
1772
1773
1774
1775
1776
1777
1778
# File 'io_t/cfn_topic_rule.rb', line 1770

def to_jsii
  result = {}
  result.merge!({
    "channelName" => @channel_name,
    "roleArn" => @role_arn,
    "batchMode" => @batch_mode,
  })
  result.compact
end