Class SnsTopicAction

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iot.actions.SnsTopicAction
All Implemented Interfaces:
IAction, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:42.026Z") @Stability(Experimental) public class SnsTopicAction extends software.amazon.jsii.JsiiObject implements IAction
(experimental) The action to write the data from an MQTT message to an Amazon SNS topic.

Example:

 import software.amazon.awscdk.services.sns.*;
 Topic topic = new Topic(this, "MyTopic");
 TopicRule topicRule = TopicRule.Builder.create(this, "TopicRule")
         .sql(IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"))
         .actions(List.of(
             SnsTopicAction.Builder.create(topic)
                     .messageFormat(SnsActionMessageFormat.JSON)
                     .build()))
         .build();
 

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    (experimental) A fluent builder for SnsTopicAction.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iot.IAction

    IAction.Jsii$Default, IAction.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
     
     
    protected
    SnsTopicAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    SnsTopicAction(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (experimental) Returns the topic rule action specification.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • SnsTopicAction

      protected SnsTopicAction(software.amazon.jsii.JsiiObjectRef objRef)
    • SnsTopicAction

      protected SnsTopicAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • SnsTopicAction

      @Stability(Experimental) public SnsTopicAction(@NotNull ITopic topic, @Nullable SnsTopicActionProps props)
      Parameters:
      topic - The Amazon SNS topic to publish data on. This parameter is required.
      props - Properties to configure the action.
    • SnsTopicAction

      @Stability(Experimental) public SnsTopicAction(@NotNull ITopic topic)
      Parameters:
      topic - The Amazon SNS topic to publish data on. This parameter is required.
  • Method Details

    • bind

      @Stability(Experimental) @NotNull public ActionConfig bind(@NotNull ITopicRule rule)
      (experimental) Returns the topic rule action specification.

      Specified by:
      bind in interface IAction
      Parameters:
      rule - This parameter is required.