Class SnsTopicAction
(experimental) The action to write the data from an MQTT message to an Amazon SNS topic.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.IoT.Actions
Assembly: Amazon.CDK.AWS.IoT.Actions.dll
Syntax (csharp)
public class SnsTopicAction : DeputyBase, IAction
Syntax (vb)
Public Class SnsTopicAction
Inherits DeputyBase
Implements IAction
Remarks
Stability: Experimental
See: https://docs.aws.amazon.com/iot/latest/developerguide/sns-rule-action.html
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.SNS;
var topic = new Topic(this, "MyTopic");
var topicRule = new TopicRule(this, "TopicRule", new TopicRuleProps {
Sql = IotSql.FromStringAsVer20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"),
Actions = new [] {
new SnsTopicAction(topic, new SnsTopicActionProps {
MessageFormat = SnsActionMessageFormat.JSON
}) }
});
Synopsis
Constructors
SnsTopicAction(ITopic, ISnsTopicActionProps) | |
SnsTopicAction(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SnsTopicAction(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(ITopicRule) | (experimental) Returns the topic rule action specification. |
Constructors
SnsTopicAction(ITopic, ISnsTopicActionProps)
public SnsTopicAction(ITopic topic, ISnsTopicActionProps props = null)
Parameters
- topic ITopic
The Amazon SNS topic to publish data on.
- props ISnsTopicActionProps
Properties to configure the action.
Remarks
Stability: Experimental
SnsTopicAction(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SnsTopicAction(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SnsTopicAction(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SnsTopicAction(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(ITopicRule)
(experimental) Returns the topic rule action specification.
public virtual IActionConfig Bind(ITopicRule rule)
Parameters
- rule ITopicRule
Returns
Remarks
Stability: Experimental