Class: AWSCDK::Greengrassv2::CfnComponentVersion::LambdaEventSourceProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic: nil, type: nil) ⇒ LambdaEventSourceProperty

Returns a new instance of LambdaEventSourceProperty.

Parameters:

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

    The topic to which to subscribe to receive event messages.

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

    The type of event source. Choose from the following options:.



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

#topicString? (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

#typeString? (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_propertiesObject



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_jsiiObject



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