Class: AWSCDK::Greengrassv2::CfnComponentVersion::LambdaEventSourceProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrassv2::CfnComponentVersion::LambdaEventSourceProperty
- Defined in:
- greengrassv2/cfn_component_version.rb
Overview
Contains information about an event source for an AWS Lambda function.
The event source defines the topics on which this Lambda function subscribes to receive messages that run the function.
Instance Attribute Summary collapse
-
#topic ⇒ String?
readonly
The topic to which to subscribe to receive event messages.
-
#type ⇒ String?
readonly
The type of event source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(topic: nil, type: nil) ⇒ LambdaEventSourceProperty
constructor
A new instance of LambdaEventSourceProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(topic: nil, type: nil) ⇒ LambdaEventSourceProperty
Returns a new instance of LambdaEventSourceProperty.
801 802 803 804 805 806 |
# File 'greengrassv2/cfn_component_version.rb', line 801 def initialize(topic: nil, type: nil) @topic = topic Jsii::Type.check_type(@topic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topic") unless @topic.nil? @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil? end |
Instance Attribute Details
#topic ⇒ String? (readonly)
The topic to which to subscribe to receive event messages.
812 813 814 |
# File 'greengrassv2/cfn_component_version.rb', line 812 def topic @topic end |
#type ⇒ String? (readonly)
The type of event source. Choose from the following options:.
PUB_SUB– Subscribe to local publish/subscribe messages. This event source type doesn't support MQTT wildcards (+and#) in the event source topic.IOT_CORE– Subscribe to AWS IoT Core MQTT messages. This event source type supports MQTT wildcards (+and#) in the event source topic.
820 821 822 |
# File 'greengrassv2/cfn_component_version.rb', line 820 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
822 823 824 825 826 827 |
# File 'greengrassv2/cfn_component_version.rb', line 822 def self.jsii_properties { :topic => "topic", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
829 830 831 832 833 834 835 836 |
# File 'greengrassv2/cfn_component_version.rb', line 829 def to_jsii result = {} result.merge!({ "topic" => @topic, "type" => @type, }) result.compact end |