@aws-cdk_aws-iot-alpha.IotSql

class IotSql ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.IoT.Alpha.IotSql
Gogithub.com/aws/aws-cdk-go/awscdkiotalpha/v2#IotSql
Javasoftware.amazon.awscdk.services.iot.alpha.IotSql
Pythonaws_cdk.aws_iot_alpha.IotSql
TypeScript (source)@aws-cdk/aws-iot-alpha ยป IotSql

Defines AWS IoT SQL.

Example

import * as sns from 'aws-cdk-lib/aws-sns';

const topic = new sns.Topic(this, 'MyTopic');

const topicRule = new iot.TopicRule(this, 'TopicRule', {
  sql: iot.IotSql.fromStringAsVer20160323(
    "SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'",
  ),
  actions: [
    new actions.SnsTopicAction(topic, {
      messageFormat: actions.SnsActionMessageFormat.JSON, // optional property, default is SnsActionMessageFormat.RAW
    }),
  ],
});

Initializer

new IotSql()

Methods

NameDescription
bind(scope)๐Ÿ”นReturns the IoT SQL configuration.
static fromStringAsVer20151008(sql)๐Ÿ”นUses the original SQL version built on 2015-10-08.
static fromStringAsVer20160323(sql)๐Ÿ”นUses the SQL version built on 2016-03-23.
static fromStringAsVerNewestUnstable(sql)๐Ÿ”นUses the most recent beta SQL version.

bind(scope)๐Ÿ”น

public bind(scope: Construct): IotSqlConfig

Parameters

  • scope Construct

Returns

  • IotSqlConfig

Returns the IoT SQL configuration.


static fromStringAsVer20151008(sql)๐Ÿ”น

public static fromStringAsVer20151008(sql: string): IotSql

Parameters

  • sql string โ€” The actual SQL-like syntax query.

Returns

  • IotSql

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


static fromStringAsVer20160323(sql)๐Ÿ”น

public static fromStringAsVer20160323(sql: string): IotSql

Parameters

  • sql string โ€” The actual SQL-like syntax query.

Returns

  • IotSql

Uses the SQL version built on 2016-03-23.


static fromStringAsVerNewestUnstable(sql)๐Ÿ”น

public static fromStringAsVerNewestUnstable(sql: string): IotSql

Parameters

  • sql string โ€” The actual SQL-like syntax query.

Returns

  • IotSql

Uses the most recent beta SQL version.

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