enum SnsActionMessageFormat
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.IoT.Actions.Alpha.SnsActionMessageFormat |
![]() | github.com/aws/aws-cdk-go/awscdkiotactionsalpha/v2#SnsActionMessageFormat |
![]() | software.amazon.awscdk.services.iot.actions.alpha.SnsActionMessageFormat |
![]() | aws_cdk.aws_iot_actions_alpha.SnsActionMessageFormat |
![]() | @aws-cdk/aws-iot-actions-alpha » SnsActionMessageFormat |
SNS topic action message format options.
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
}),
],
});
Members
Name | Description |
---|---|
RAW | RAW message format. |
JSON | JSON message format. |
RAW
RAW message format.
JSON
JSON message format.