Class: AWSCDK::IoTEvents::CfnAlarmModel::PayloadProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_events/cfn_alarm_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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content_expression:, type:) ⇒ PayloadProperty

Returns a new instance of PayloadProperty.

Parameters:

  • content_expression (String)

    The content of the payload.

  • type (String)

    The value of the payload type can be either STRING or JSON .



1722
1723
1724
1725
1726
1727
# File 'io_t_events/cfn_alarm_model.rb', line 1722

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_expressionString (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.



1735
1736
1737
# File 'io_t_events/cfn_alarm_model.rb', line 1735

def content_expression
  @content_expression
end

#typeString (readonly)

The value of the payload type can be either STRING or JSON .



1740
1741
1742
# File 'io_t_events/cfn_alarm_model.rb', line 1740

def type
  @type
end

Class Method Details

.jsii_propertiesObject



1742
1743
1744
1745
1746
1747
# File 'io_t_events/cfn_alarm_model.rb', line 1742

def self.jsii_properties
  {
    :content_expression => "contentExpression",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



1749
1750
1751
1752
1753
1754
1755
1756
# File 'io_t_events/cfn_alarm_model.rb', line 1749

def to_jsii
  result = {}
  result.merge!({
    "contentExpression" => @content_expression,
    "type" => @type,
  })
  result.compact
end