Class TopicRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.iot.TopicRule
- All Implemented Interfaces:
IConstruct,IDependable,IResource,ITopicRule,software.amazon.jsii.JsiiSerializable,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.
Example:
Bucket bucket = new Bucket(this, "MyBucket");
TopicRule.Builder.create(this, "TopicRule")
.sql(IotSql.fromStringAsVer20160323("SELECT * FROM 'device/+/data'"))
.actions(List.of(
S3PutObjectAction.Builder.create(bucket)
.accessControl(BucketAccessControl.PUBLIC_READ)
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forTopicRule.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.iot.ITopicRule
ITopicRule.Jsii$Default, ITopicRule.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTopicRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTopicRule(software.amazon.jsii.JsiiObjectRef objRef) TopicRule(software.constructs.Construct scope, String id, TopicRuleProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid(experimental) Add a action to the topic rule.static ITopicRulefromTopicRuleArn(software.constructs.Construct scope, String id, String topicRuleArn) (experimental) Import an existing AWS IoT Rule provided an ARN.(experimental) Arn of this topic rule.(experimental) Name of this topic rule.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TopicRule
protected TopicRule(software.amazon.jsii.JsiiObjectRef objRef) -
TopicRule
protected TopicRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TopicRule
@Stability(Experimental) public TopicRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TopicRuleProps props) - Parameters:
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.- Parameters:
scope- The parent creating construct (usuallythis). This parameter is required.id- The construct's name. This parameter is required.topicRuleArn- AWS IoT Rule ARN (i.e. arn:aws:iot::<account-id>:rule/MyRule). This parameter is required.
-
addAction
(experimental) Add a action to the topic rule.- Parameters:
action- the action to associate with the topic rule. This parameter is required.
-
getTopicRuleArn
(experimental) Arn of this topic rule.- Specified by:
getTopicRuleArnin interfaceITopicRule
-
getTopicRuleName
(experimental) Name of this topic rule.- Specified by:
getTopicRuleNamein interfaceITopicRule
-