IotSql

class aws_cdk.aws_iot.IotSql

Bases: object

(experimental) Defines AWS IoT SQL.

Stability

experimental

ExampleMetadata

infused

Example:

bucket = s3.Bucket(self, "MyBucket")

iot.TopicRule(self, "TopicRule",
    sql=iot.IotSql.from_string_as_ver20160323("SELECT * FROM 'device/+/data'"),
    actions=[
        actions.S3PutObjectAction(bucket,
            access_control=s3.BucketAccessControl.PUBLIC_READ
        )
    ]
)
Stability

experimental

Methods

abstract bind(scope)

(experimental) Returns the IoT SQL configuration.

Parameters

scope (Construct) –

Stability

experimental

Return type

IotSqlConfig

Static Methods

classmethod from_string_as_ver20151008(sql)

(experimental) Uses the original SQL version built on 2015-10-08.

Parameters

sql (str) – The actual SQL-like syntax query.

Return type

IotSql

Returns

Instance of IotSql

Stability

experimental

classmethod from_string_as_ver20160323(sql)

(experimental) Uses the SQL version built on 2016-03-23.

Parameters

sql (str) – The actual SQL-like syntax query.

Return type

IotSql

Returns

Instance of IotSql

Stability

experimental

classmethod from_string_as_ver_newest_unstable(sql)

(experimental) Uses the most recent beta SQL version.

If you use this version, it might introduce breaking changes to your rules.

Parameters

sql (str) – The actual SQL-like syntax query.

Return type

IotSql

Returns

Instance of IotSql

Stability

experimental