class SqsQueueAction
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoT.Actions.Alpha.SqsQueueAction |
Go | github.com/aws/aws-cdk-go/awscdkiotactionsalpha/v2#SqsQueueAction |
Java | software.amazon.awscdk.services.iot.actions.alpha.SqsQueueAction |
Python | aws_cdk.aws_iot_actions_alpha.SqsQueueAction |
TypeScript (source) | @aws-cdk/aws-iot-actions-alpha » SqsQueueAction |
Implements
IAction
The action to write the data from an MQTT message to an Amazon SQS queue.
Example
import * as sqs from 'aws-cdk-lib/aws-sqs';
const queue = new sqs.Queue(this, 'MyQueue');
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.SqsQueueAction(queue, {
useBase64: true, // optional property, default is 'false'
}),
],
});
Initializer
new SqsQueueAction(queue: IQueue, props?: SqsQueueActionProps)
Parameters
- queue
IQueue
— The Amazon SQS queue to which to write data. - props
Sqs
— Optional properties to not use default.Queue Action Props