Class: AWSCDK::IoT::CfnTopicRule::SNSActionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_topic_rule.rb

Overview

Describes an action to publish to an Amazon SNS topic.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role_arn:, target_arn:, message_format: nil) ⇒ SNSActionProperty

Returns a new instance of SNSActionProperty.

Parameters:

  • role_arn (String)

    The ARN of the IAM role that grants access.

  • target_arn (String)

    The ARN of the SNS topic.

  • message_format (String, nil) (defaults to: nil)

    (Optional) The message format of the message to publish.



2688
2689
2690
2691
2692
2693
2694
2695
# File 'io_t/cfn_topic_rule.rb', line 2688

def initialize(role_arn:, target_arn:, message_format: nil)
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @target_arn = target_arn
  Jsii::Type.check_type(@target_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetArn")
  @message_format = message_format
  Jsii::Type.check_type(@message_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "messageFormat") unless @message_format.nil?
end

Instance Attribute Details

#message_formatString? (readonly)

(Optional) The message format of the message to publish.

Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. For more information, see Amazon SNS Message and JSON Formats in the Amazon Simple Notification Service Developer Guide .



2713
2714
2715
# File 'io_t/cfn_topic_rule.rb', line 2713

def message_format
  @message_format
end

#role_arnString (readonly)

The ARN of the IAM role that grants access.



2701
2702
2703
# File 'io_t/cfn_topic_rule.rb', line 2701

def role_arn
  @role_arn
end

#target_arnString (readonly)

The ARN of the SNS topic.



2706
2707
2708
# File 'io_t/cfn_topic_rule.rb', line 2706

def target_arn
  @target_arn
end

Class Method Details

.jsii_propertiesObject



2715
2716
2717
2718
2719
2720
2721
# File 'io_t/cfn_topic_rule.rb', line 2715

def self.jsii_properties
  {
    :role_arn => "roleArn",
    :target_arn => "targetArn",
    :message_format => "messageFormat",
  }
end

Instance Method Details

#to_jsiiObject



2723
2724
2725
2726
2727
2728
2729
2730
2731
# File 'io_t/cfn_topic_rule.rb', line 2723

def to_jsii
  result = {}
  result.merge!({
    "roleArn" => @role_arn,
    "targetArn" => @target_arn,
    "messageFormat" => @message_format,
  })
  result.compact
end