Class: AWSCDK::IoTEvents::CfnDetectorModel::SQSProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnDetectorModel::SQSProperty
- Defined in:
- io_t_events/cfn_detector_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.
1966 1967 1968 1969 1970 1971 1972 1973 |
# File 'io_t_events/cfn_detector_model.rb', line 1966 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::CfnDetectorModel::PayloadProperty.new(**payload.transform_keys(&:to_sym)) : payload Jsii::Type.check_type(@payload, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5QYXlsb2FkUHJvcGVydHkifV19fQ==")), "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.
1984 1985 1986 |
# File 'io_t_events/cfn_detector_model.rb', line 1984 def payload @payload end |
#queue_url ⇒ String (readonly)
The URL of the SQS queue where the data is written.
1979 1980 1981 |
# File 'io_t_events/cfn_detector_model.rb', line 1979 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.
1991 1992 1993 |
# File 'io_t_events/cfn_detector_model.rb', line 1991 def use_base64 @use_base64 end |
Class Method Details
.jsii_properties ⇒ Object
1993 1994 1995 1996 1997 1998 1999 |
# File 'io_t_events/cfn_detector_model.rb', line 1993 def self.jsii_properties { :queue_url => "queueUrl", :payload => "payload", :use_base64 => "useBase64", } end |
Instance Method Details
#to_jsii ⇒ Object
2001 2002 2003 2004 2005 2006 2007 2008 2009 |
# File 'io_t_events/cfn_detector_model.rb', line 2001 def to_jsii result = {} result.merge!({ "queueUrl" => @queue_url, "payload" => @payload, "useBase64" => @use_base64, }) result.compact end |