Class: AWSCDK::IoTEvents::CfnAlarmModel::IotTopicPublishProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnAlarmModel::IotTopicPublishProperty
- Defined in:
- io_t_events/cfn_alarm_model.rb
Overview
Information required to publish the MQTT message through the AWS IoT message broker.
Instance Attribute Summary collapse
-
#mqtt_topic ⇒ String
readonly
The MQTT topic of the message.
-
#payload ⇒ AWSCDK::IResolvable, ...
readonly
You can configure the action payload when you publish a message to an AWS IoT Core topic.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(mqtt_topic:, payload: nil) ⇒ IotTopicPublishProperty
constructor
A new instance of IotTopicPublishProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(mqtt_topic:, payload: nil) ⇒ IotTopicPublishProperty
Returns a new instance of IotTopicPublishProperty.
1632 1633 1634 1635 1636 1637 |
# File 'io_t_events/cfn_alarm_model.rb', line 1632 def initialize(mqtt_topic:, payload: nil) @mqtt_topic = mqtt_topic Jsii::Type.check_type(@mqtt_topic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mqttTopic") @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
#mqtt_topic ⇒ String (readonly)
The MQTT topic of the message.
You can use a string expression that includes variables ( $variable.<variable-name> ) and input values ( $input.<input-name>.<path-to-datum> ) as the topic string.
1645 1646 1647 |
# File 'io_t_events/cfn_alarm_model.rb', line 1645 def mqtt_topic @mqtt_topic end |
#payload ⇒ AWSCDK::IResolvable, ... (readonly)
You can configure the action payload when you publish a message to an AWS IoT Core topic.
1650 1651 1652 |
# File 'io_t_events/cfn_alarm_model.rb', line 1650 def payload @payload end |
Class Method Details
.jsii_properties ⇒ Object
1652 1653 1654 1655 1656 1657 |
# File 'io_t_events/cfn_alarm_model.rb', line 1652 def self.jsii_properties { :mqtt_topic => "mqttTopic", :payload => "payload", } end |
Instance Method Details
#to_jsii ⇒ Object
1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'io_t_events/cfn_alarm_model.rb', line 1659 def to_jsii result = {} result.merge!({ "mqttTopic" => @mqtt_topic, "payload" => @payload, }) result.compact end |