interface TopicRuleProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoT.TopicRuleProps |
Java | software.amazon.awscdk.services.iot.TopicRuleProps |
Python | aws_cdk.aws_iot.TopicRuleProps |
TypeScript (source) | @aws-cdk/aws-iot » TopicRuleProps |
Properties for defining an AWS IoT Rule.
Example
const bucket = new s3.Bucket(this, 'MyBucket');
new iot.TopicRule(this, 'TopicRule', {
sql: iot.IotSql.fromStringAsVer20160323("SELECT * FROM 'device/+/data'"),
actions: [
new actions.S3PutObjectAction(bucket, {
accessControl: s3.BucketAccessControl.PUBLIC_READ,
}),
],
});
Properties
Name | Type | Description |
---|---|---|
sql | Iot | A simplified SQL syntax to filter messages received on an MQTT topic and push the data elsewhere. |
actions? | IAction [] | The actions associated with the topic rule. |
description? | string | A textual description of the topic rule. |
enabled? | boolean | Specifies whether the rule is enabled. |
error | IAction | The action AWS IoT performs when it is unable to perform a rule's action. |
topic | string | The name of the topic rule. |
sql
Type:
Iot
A simplified SQL syntax to filter messages received on an MQTT topic and push the data elsewhere.
See also: https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-reference.html
actions?
Type:
IAction
[]
(optional, default: No actions will be perform)
The actions associated with the topic rule.
description?
Type:
string
(optional, default: None)
A textual description of the topic rule.
enabled?
Type:
boolean
(optional, default: true)
Specifies whether the rule is enabled.
errorAction?
Type:
IAction
(optional, default: no action will be performed)
The action AWS IoT performs when it is unable to perform a rule's action.
topicRuleName?
Type:
string
(optional, default: None)
The name of the topic rule.