Class TopicRule

All Implemented Interfaces:
IConstruct, IDependable, IResource, ITopicRule,, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.724Z") @Stability(Experimental) public class TopicRule extends Resource implements ITopicRule
(experimental) Defines an AWS IoT Rule in this stack.


 Bucket bucket = new Bucket(this, "MyBucket");
 TopicRule.Builder.create(this, "TopicRule")
         .sql(IotSql.fromStringAsVer20160323("SELECT * FROM 'device/+/data'"))
  • Constructor Details

    • TopicRule

      protected TopicRule( objRef)
    • TopicRule

      protected TopicRule( initializationMode)
    • TopicRule

      @Stability(Experimental) public TopicRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TopicRuleProps props)
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromTopicRuleArn

      @Stability(Experimental) @NotNull public static ITopicRule fromTopicRuleArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String topicRuleArn)
      (experimental) Import an existing AWS IoT Rule provided an ARN.

      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      topicRuleArn - AWS IoT Rule ARN (i.e. arn:aws:iot::invalid input: '<'account-id>:rule/MyRule). This parameter is required.
    • addAction

      @Stability(Experimental) public void addAction(@NotNull IAction action)
      (experimental) Add a action to the topic rule.

      action - the action to associate with the topic rule. This parameter is required.
    • getTopicRuleArn

      @Stability(Experimental) @NotNull public String getTopicRuleArn()
      (experimental) Arn of this topic rule.
      Specified by:
      getTopicRuleArn in interface ITopicRule
    • getTopicRuleName

      @Stability(Experimental) @NotNull public String getTopicRuleName()
      (experimental) Name of this topic rule.
      Specified by:
      getTopicRuleName in interface ITopicRule