SqsQueueAction

class aws_cdk.aws_iot_actions.SqsQueueAction(queue, *, use_base64=None, role=None)

Bases: object

(experimental) The action to write the data from an MQTT message to an Amazon SQS queue.

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_sqs as sqs


queue = sqs.Queue(self, "MyQueue")

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.SqsQueueAction(queue,
            use_base64=True
        )
    ]
)
Parameters:
  • queue (IQueue) – The Amazon SQS queue to which to write data.

  • use_base64 (Optional[bool]) – (experimental) Specifies whether to use Base64 encoding. Default: false

  • role (Optional[IRole]) – (experimental) The IAM role that allows access to AWS service. Default: a new role will be created

Stability:

experimental

Methods

bind(rule)

(experimental) Returns the topic rule action specification.

Parameters:

rule (ITopicRule) –

Stability:

experimental

Return type:

ActionConfig