SnsActionMessageFormat

class aws_cdk.aws_iot_actions.SnsActionMessageFormat(value)

Bases: Enum

(experimental) SNS topic action message format options.

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_sns as sns


topic = sns.Topic(self, "MyTopic")

topic_rule = iot.TopicRule(self, "TopicRule",
    sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"),
    actions=[
        actions.SnsTopicAction(topic,
            message_format=actions.SnsActionMessageFormat.JSON
        )
    ]
)

Attributes

JSON

(experimental) JSON message format.

Stability:

experimental

RAW

(experimental) RAW message format.

Stability:

experimental