Class: AWSCDK::IoTEvents::CfnAlarmModel::LambdaProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnAlarmModel::LambdaProperty
- Defined in:
- io_t_events/cfn_alarm_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.
1677 1678 1679 1680 1681 1682 |
# File 'io_t_events/cfn_alarm_model.rb', line 1677 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::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
#function_arn ⇒ String (readonly)
The ARN of the Lambda function that is executed.
1688 1689 1690 |
# File 'io_t_events/cfn_alarm_model.rb', line 1688 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.
1693 1694 1695 |
# File 'io_t_events/cfn_alarm_model.rb', line 1693 def payload @payload end |
Class Method Details
.jsii_properties ⇒ Object
1695 1696 1697 1698 1699 1700 |
# File 'io_t_events/cfn_alarm_model.rb', line 1695 def self.jsii_properties { :function_arn => "functionArn", :payload => "payload", } end |
Instance Method Details
#to_jsii ⇒ Object
1702 1703 1704 1705 1706 1707 1708 1709 |
# File 'io_t_events/cfn_alarm_model.rb', line 1702 def to_jsii result = {} result.merge!({ "functionArn" => @function_arn, "payload" => @payload, }) result.compact end |