Class: AWSCDK::IoTEvents::CfnDetectorModel::PayloadProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnDetectorModel::PayloadProperty
- Defined in:
- io_t_events/cfn_detector_model.rb
Overview
Information needed to configure the payload.
By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use content_expression .
Instance Attribute Summary collapse
-
#content_expression ⇒ String
readonly
The content of the payload.
-
#type ⇒ String
readonly
The value of the payload type can be either
STRINGorJSON.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_expression:, type:) ⇒ PayloadProperty
constructor
A new instance of PayloadProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content_expression:, type:) ⇒ PayloadProperty
Returns a new instance of PayloadProperty.
1742 1743 1744 1745 1746 1747 |
# File 'io_t_events/cfn_detector_model.rb', line 1742 def initialize(content_expression:, type:) @content_expression = content_expression Jsii::Type.check_type(@content_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentExpression") @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") end |
Instance Attribute Details
#content_expression ⇒ String (readonly)
The content of the payload.
You can use a string expression that includes quoted strings ( '<string>' ), variables ( $variable.<variable-name> ), input values ( $input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.
1755 1756 1757 |
# File 'io_t_events/cfn_detector_model.rb', line 1755 def content_expression @content_expression end |
#type ⇒ String (readonly)
The value of the payload type can be either STRING or JSON .
1760 1761 1762 |
# File 'io_t_events/cfn_detector_model.rb', line 1760 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
1762 1763 1764 1765 1766 1767 |
# File 'io_t_events/cfn_detector_model.rb', line 1762 def self.jsii_properties { :content_expression => "contentExpression", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
1769 1770 1771 1772 1773 1774 1775 1776 |
# File 'io_t_events/cfn_detector_model.rb', line 1769 def to_jsii result = {} result.merge!({ "contentExpression" => @content_expression, "type" => @type, }) result.compact end |