Class CfnTopicRule

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, ITopicRuleRef, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-17T14:54:05.766Z") @Stability(Stable) public class CfnTopicRule extends CfnResource implements IInspectable, ITopicRuleRef, ITaggable
Use the AWS::IoT::TopicRule resource to declare an AWS IoT rule.

For information about working with AWS IoT rules, see Rules for AWS IoT in the AWS IoT Developer Guide .

Example:

 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTopicRule

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

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

      @Stability(Stable) public CfnTopicRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTopicRuleProps props)
      Create a new AWS::IoT::TopicRule.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForTopicRule

      @Stability(Stable) @NotNull public static String arnForTopicRule(@NotNull ITopicRuleRef resource)
      Parameters:
      resource - This parameter is required.
    • fromRuleName

      @Stability(Stable) @NotNull public static ITopicRuleRef fromRuleName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String ruleName)
      Creates a new ITopicRuleRef from a ruleName.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      ruleName - This parameter is required.
    • fromTopicRuleArn

      @Stability(Stable) @NotNull public static ITopicRuleRef fromTopicRuleArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn)
      Creates a new ITopicRuleRef from an ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      arn - This parameter is required.
    • isCfnTopicRule

      @Stability(Stable) @NotNull public static Boolean isCfnTopicRule(@NotNull Object x)
      Checks whether the given object is a CfnTopicRule.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the AWS IoT rule, such as arn:aws:iot:us-east-2:123456789012:rule/MyIoTRule .
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getTopicRuleRef

      @Stability(Stable) @NotNull public TopicRuleReference getTopicRuleRef()
      A reference to a TopicRule resource.
      Specified by:
      getTopicRuleRef in interface ITopicRuleRef
    • getTopicRulePayload

      @Stability(Stable) @NotNull public Object getTopicRulePayload()
      The rule payload.

      Returns union: either IResolvable or CfnTopicRule.TopicRulePayloadProperty

    • setTopicRulePayload

      @Stability(Stable) public void setTopicRulePayload(@NotNull IResolvable value)
      The rule payload.
    • setTopicRulePayload

      @Stability(Stable) public void setTopicRulePayload(@NotNull CfnTopicRule.TopicRulePayloadProperty value)
      The rule payload.
    • getRuleName

      @Stability(Stable) @Nullable public String getRuleName()
      The name of the rule.
    • setRuleName

      @Stability(Stable) public void setRuleName(@Nullable String value)
      The name of the rule.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Metadata which can be used to manage the topic rule.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Metadata which can be used to manage the topic rule.