Class: AWSCDK::IoTEvents::CfnDetectorModel::SNSProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_events/cfn_detector_model.rb

Overview

Information required to publish the Amazon SNS message.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_arn:, payload: nil) ⇒ SNSProperty

Returns a new instance of SNSProperty.

Parameters:



1922
1923
1924
1925
1926
1927
# File 'io_t_events/cfn_detector_model.rb', line 1922

def initialize(target_arn:, payload: nil)
  @target_arn = target_arn
  Jsii::Type.check_type(@target_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetArn")
  @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?
end

Instance Attribute Details

#payloadAWSCDK::IResolvable, ... (readonly)

You can configure the action payload when you send a message as an Amazon SNS push notification.



1938
1939
1940
# File 'io_t_events/cfn_detector_model.rb', line 1938

def payload
  @payload
end

#target_arnString (readonly)

The ARN of the Amazon SNS target where the message is sent.



1933
1934
1935
# File 'io_t_events/cfn_detector_model.rb', line 1933

def target_arn
  @target_arn
end

Class Method Details

.jsii_propertiesObject



1940
1941
1942
1943
1944
1945
# File 'io_t_events/cfn_detector_model.rb', line 1940

def self.jsii_properties
  {
    :target_arn => "targetArn",
    :payload => "payload",
  }
end

Instance Method Details

#to_jsiiObject



1947
1948
1949
1950
1951
1952
1953
1954
# File 'io_t_events/cfn_detector_model.rb', line 1947

def to_jsii
  result = {}
  result.merge!({
    "targetArn" => @target_arn,
    "payload" => @payload,
  })
  result.compact
end