Class: AWSCDK::IoT::CfnTopicRule::IotEventsActionProperty

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

Overview

Sends an input to an AWS IoT Events detector.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_name:, role_arn:, batch_mode: nil, message_id: nil) ⇒ IotEventsActionProperty

Returns a new instance of IotEventsActionProperty.

Parameters:

  • input_name (String)

    The name of the AWS IoT Events input.

  • role_arn (String)

    The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector.

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

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

  • message_id (String, nil) (defaults to: nil)

    The ID of the message. The default messageId is a new UUID value.



1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
# File 'io_t/cfn_topic_rule.rb', line 1791

def initialize(input_name:, role_arn:, batch_mode: nil, message_id: nil)
  @input_name = input_name
  Jsii::Type.check_type(@input_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inputName")
  @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?
  @message_id = message_id
  Jsii::Type.check_type(@message_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "messageId") unless @message_id.nil?
end

Instance Attribute Details

#batch_modeBoolean, ... (readonly)

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

When batch_mode is true , you can't specify a message_id .

When batch_mode 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.



1822
1823
1824
# File 'io_t/cfn_topic_rule.rb', line 1822

def batch_mode
  @batch_mode
end

#input_nameString (readonly)

The name of the AWS IoT Events input.



1806
1807
1808
# File 'io_t/cfn_topic_rule.rb', line 1806

def input_name
  @input_name
end

#message_idString? (readonly)

The ID of the message. The default messageId is a new UUID value.

When batch_mode is true , you can't specify a message_id --a new UUID value will be assigned.

Assign a value to this property to ensure that only one input (message) with a given message_id will be processed by an AWS IoT Events detector.



1831
1832
1833
# File 'io_t/cfn_topic_rule.rb', line 1831

def message_id
  @message_id
end

#role_arnString (readonly)

The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector.

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



1813
1814
1815
# File 'io_t/cfn_topic_rule.rb', line 1813

def role_arn
  @role_arn
end

Class Method Details

.jsii_propertiesObject



1833
1834
1835
1836
1837
1838
1839
1840
# File 'io_t/cfn_topic_rule.rb', line 1833

def self.jsii_properties
  {
    :input_name => "inputName",
    :role_arn => "roleArn",
    :batch_mode => "batchMode",
    :message_id => "messageId",
  }
end

Instance Method Details

#to_jsiiObject



1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
# File 'io_t/cfn_topic_rule.rb', line 1842

def to_jsii
  result = {}
  result.merge!({
    "inputName" => @input_name,
    "roleArn" => @role_arn,
    "batchMode" => @batch_mode,
    "messageId" => @message_id,
  })
  result.compact
end