@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:10.310Z") @Stability(value=Experimental) public interface TopicRuleProps extends software.amazon.jsii.JsiiSerializable
Example:
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
Function func = Function.Builder.create(this, "MyFunction")
.runtime(Runtime.NODEJS_14_X)
.handler("index.handler")
.code(Code.fromInline("\n exports.handler = (event) => {\n console.log(\"It is test for lambda action of AWS IoT Rule.\", event);\n };"))
.build();
TopicRule.Builder.create(this, "TopicRule")
.sql(IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id, timestamp() as timestamp, temperature FROM 'device/+/data'"))
.actions(List.of(new LambdaFunctionAction(func)))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
TopicRuleProps.Builder
A builder for
TopicRuleProps |
static class |
TopicRuleProps.Jsii$Proxy
An implementation for
TopicRuleProps |
| Modifier and Type | Method and Description |
|---|---|
static TopicRuleProps.Builder |
builder() |
default List<IAction> |
getActions()
(experimental) The actions associated with the topic rule.
|
default String |
getDescription()
(experimental) A textual description of the topic rule.
|
default Boolean |
getEnabled()
(experimental) Specifies whether the rule is enabled.
|
default IAction |
getErrorAction()
(experimental) The action AWS IoT performs when it is unable to perform a rule's action.
|
IotSql |
getSql()
(experimental) A simplified SQL syntax to filter messages received on an MQTT topic and push the data elsewhere.
|
default String |
getTopicRuleName()
(experimental) The name of the topic rule.
|
@Stability(value=Experimental) @NotNull IotSql getSql()
https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-reference.html@Stability(value=Experimental) @Nullable default List<IAction> getActions()
Default: No actions will be perform
@Stability(value=Experimental) @Nullable default String getDescription()
Default: None
@Stability(value=Experimental) @Nullable default Boolean getEnabled()
Default: true
@Stability(value=Experimental) @Nullable default IAction getErrorAction()
Default: - no action will be performed
@Stability(value=Experimental) @Nullable default String getTopicRuleName()
Default: None
@Stability(value=Experimental) static TopicRuleProps.Builder builder()
TopicRuleProps.Builder of TopicRulePropsCopyright © 2022. All rights reserved.