Class: AWSCDK::IoTEvents::CfnAlarmModel::SQSProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnAlarmModel::SQSProperty
- Defined in:
- io_t_events/cfn_alarm_model.rb
Overview
Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
Instance Attribute Summary collapse
-
#payload ⇒ AWSCDK::IResolvable, ...
readonly
You can configure the action payload when you send a message to an Amazon SQS queue.
-
#queue_url ⇒ String
readonly
The URL of the SQS queue where the data is written.
-
#use_base64 ⇒ Boolean, ...
readonly
Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(queue_url:, payload: nil, use_base64: nil) ⇒ SQSProperty
constructor
A new instance of SQSProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(queue_url:, payload: nil, use_base64: nil) ⇒ SQSProperty
Returns a new instance of SQSProperty.
1868 1869 1870 1871 1872 1873 1874 1875 |
# File 'io_t_events/cfn_alarm_model.rb', line 1868 def initialize(queue_url:, payload: nil, use_base64: nil) @queue_url = queue_url Jsii::Type.check_type(@queue_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queueUrl") @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? @use_base64 = use_base64 Jsii::Type.check_type(@use_base64, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "useBase64") unless @use_base64.nil? end |
Instance Attribute Details
#payload ⇒ AWSCDK::IResolvable, ... (readonly)
You can configure the action payload when you send a message to an Amazon SQS queue.
1886 1887 1888 |
# File 'io_t_events/cfn_alarm_model.rb', line 1886 def payload @payload end |
#queue_url ⇒ String (readonly)
The URL of the SQS queue where the data is written.
1881 1882 1883 |
# File 'io_t_events/cfn_alarm_model.rb', line 1881 def queue_url @queue_url end |
#use_base64 ⇒ Boolean, ... (readonly)
Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue.
Otherwise, set this to FALSE.
1893 1894 1895 |
# File 'io_t_events/cfn_alarm_model.rb', line 1893 def use_base64 @use_base64 end |
Class Method Details
.jsii_properties ⇒ Object
1895 1896 1897 1898 1899 1900 1901 |
# File 'io_t_events/cfn_alarm_model.rb', line 1895 def self.jsii_properties { :queue_url => "queueUrl", :payload => "payload", :use_base64 => "useBase64", } end |
Instance Method Details
#to_jsii ⇒ Object
1903 1904 1905 1906 1907 1908 1909 1910 1911 |
# File 'io_t_events/cfn_alarm_model.rb', line 1903 def to_jsii result = {} result.merge!({ "queueUrl" => @queue_url, "payload" => @payload, "useBase64" => @use_base64, }) result.compact end |