Class: AWSCDK::IoTEvents::CfnAlarmModel::IotEventsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_events/cfn_alarm_model.rb

Overview

Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_name:, payload: nil) ⇒ IotEventsProperty

Returns a new instance of IotEventsProperty.

Parameters:



1497
1498
1499
1500
1501
1502
# File 'io_t_events/cfn_alarm_model.rb', line 1497

def initialize(input_name:, payload: nil)
  @input_name = input_name
  Jsii::Type.check_type(@input_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inputName")
  @payload = payload.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::PayloadProperty.new(**payload.transform_keys(&:to_sym)) : payload
  Jsii::Type.check_type(@payload, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5QYXlsb2FkUHJvcGVydHkifV19fQ==")), "payload") unless @payload.nil?
end

Instance Attribute Details

#input_nameString (readonly)

The name of the AWS IoT Events input where the data is sent.



1508
1509
1510
# File 'io_t_events/cfn_alarm_model.rb', line 1508

def input_name
  @input_name
end

#payloadAWSCDK::IResolvable, ... (readonly)

You can configure the action payload when you send a message to an AWS IoT Events input.



1513
1514
1515
# File 'io_t_events/cfn_alarm_model.rb', line 1513

def payload
  @payload
end

Class Method Details

.jsii_propertiesObject



1515
1516
1517
1518
1519
1520
# File 'io_t_events/cfn_alarm_model.rb', line 1515

def self.jsii_properties
  {
    :input_name => "inputName",
    :payload => "payload",
  }
end

Instance Method Details

#to_jsiiObject



1522
1523
1524
1525
1526
1527
1528
1529
# File 'io_t_events/cfn_alarm_model.rb', line 1522

def to_jsii
  result = {}
  result.merge!({
    "inputName" => @input_name,
    "payload" => @payload,
  })
  result.compact
end