Class: AWSCDK::IoTEvents::CfnDetectorModel::LambdaProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnDetectorModel::LambdaProperty
- Defined in:
- io_t_events/cfn_detector_model.rb
Overview
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
Instance Attribute Summary collapse
-
#function_arn ⇒ String
readonly
The ARN of the Lambda function that is executed.
-
#payload ⇒ AWSCDK::IResolvable, ...
readonly
You can configure the action payload when you send a message to a Lambda function.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(function_arn:, payload: nil) ⇒ LambdaProperty
constructor
A new instance of LambdaProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(function_arn:, payload: nil) ⇒ LambdaProperty
Returns a new instance of LambdaProperty.
1588 1589 1590 1591 1592 1593 |
# File 'io_t_events/cfn_detector_model.rb', line 1588 def initialize(function_arn:, payload: nil) @function_arn = function_arn Jsii::Type.check_type(@function_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionArn") @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
#function_arn ⇒ String (readonly)
The ARN of the Lambda function that is executed.
1599 1600 1601 |
# File 'io_t_events/cfn_detector_model.rb', line 1599 def function_arn @function_arn end |
#payload ⇒ AWSCDK::IResolvable, ... (readonly)
You can configure the action payload when you send a message to a Lambda function.
1604 1605 1606 |
# File 'io_t_events/cfn_detector_model.rb', line 1604 def payload @payload end |
Class Method Details
.jsii_properties ⇒ Object
1606 1607 1608 1609 1610 1611 |
# File 'io_t_events/cfn_detector_model.rb', line 1606 def self.jsii_properties { :function_arn => "functionArn", :payload => "payload", } end |
Instance Method Details
#to_jsii ⇒ Object
1613 1614 1615 1616 1617 1618 1619 1620 |
# File 'io_t_events/cfn_detector_model.rb', line 1613 def to_jsii result = {} result.merge!({ "functionArn" => @function_arn, "payload" => @payload, }) result.compact end |