@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-13T01:13:28.659Z") public class TopicRule extends Resource implements ITopicRule
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();
Modifier and Type | Class and Description |
---|---|
static class |
TopicRule.Builder
(experimental) A fluent builder for
TopicRule . |
ITopicRule.Jsii$Default, ITopicRule.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
TopicRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
TopicRule(software.amazon.jsii.JsiiObjectRef objRef) |
|
TopicRule(software.constructs.Construct scope,
java.lang.String id,
TopicRuleProps props) |
Modifier and Type | Method and Description |
---|---|
void |
addAction(IAction action)
(experimental) Add a action to the topic rule.
|
static ITopicRule |
fromTopicRuleArn(software.constructs.Construct scope,
java.lang.String id,
java.lang.String topicRuleArn)
(experimental) Import an existing AWS IoT Rule provided an ARN.
|
java.lang.String |
getTopicRuleArn()
(experimental) Arn of this topic rule.
|
java.lang.String |
getTopicRuleName()
(experimental) Name of this topic rule.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected TopicRule(software.amazon.jsii.JsiiObjectRef objRef)
protected TopicRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public TopicRule(software.constructs.Construct scope, java.lang.String id, TopicRuleProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static ITopicRule fromTopicRuleArn(software.constructs.Construct scope, java.lang.String id, java.lang.String topicRuleArn)
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:public void addAction(IAction action)
action
- the action to associate with the topic rule. This parameter is required.public java.lang.String getTopicRuleArn()
getTopicRuleArn
in interface ITopicRule
public java.lang.String getTopicRuleName()
getTopicRuleName
in interface ITopicRule