class SqsQueueAction
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoT.Actions.SqsQueueAction |
Java | software.amazon.awscdk.services.iot.actions.SqsQueueAction |
Python | aws_cdk.aws_iot_actions.SqsQueueAction |
TypeScript (source) | @aws-cdk/aws-iot-actions » 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/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
Methods
Name | Description |
---|---|
bind(rule) | Returns the topic rule action specification. |
bind(rule)
public bind(rule: ITopicRule): ActionConfig
Parameters
- rule
ITopic
Rule
Returns
Returns the topic rule action specification.