Class: AWSCDK::IoTEvents::CfnDetectorModel::IotTopicPublishProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnDetectorModel::IotTopicPublishProperty
- Defined in:
- io_t_events/cfn_detector_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.
1543 1544 1545 1546 1547 1548 |
# File 'io_t_events/cfn_detector_model.rb', line 1543 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::CfnDetectorModel::PayloadProperty.new(**payload.transform_keys(&:to_sym)) : payload Jsii::Type.check_type(@payload, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5QYXlsb2FkUHJvcGVydHkifV19fQ==")), "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.
1556 1557 1558 |
# File 'io_t_events/cfn_detector_model.rb', line 1556 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.
1561 1562 1563 |
# File 'io_t_events/cfn_detector_model.rb', line 1561 def payload @payload end |
Class Method Details
.jsii_properties ⇒ Object
1563 1564 1565 1566 1567 1568 |
# File 'io_t_events/cfn_detector_model.rb', line 1563 def self.jsii_properties { :mqtt_topic => "mqttTopic", :payload => "payload", } end |
Instance Method Details
#to_jsii ⇒ Object
1570 1571 1572 1573 1574 1575 1576 1577 |
# File 'io_t_events/cfn_detector_model.rb', line 1570 def to_jsii result = {} result.merge!({ "mqttTopic" => @mqtt_topic, "payload" => @payload, }) result.compact end |