IotRepublishMqttActionProps

class aws_cdk.aws_iot_actions.IotRepublishMqttActionProps(*, role=None, quality_of_service=None)

Bases: CommonActionProps

(experimental) Configuration properties of an action to republish MQTT messages.

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

  • quality_of_service (Optional[MqttQualityOfService]) – (experimental) The Quality of Service (QoS) level to use when republishing messages. Default: MqttQualityOfService.ZERO_OR_MORE_TIMES

Stability:

experimental

ExampleMetadata:

infused

Example:

iot.TopicRule(self, "TopicRule",
    sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp, temperature FROM 'device/+/data'"),
    actions=[
        actions.IotRepublishMqttAction("${topic()}/republish",
            quality_of_service=actions.MqttQualityOfService.AT_LEAST_ONCE
        )
    ]
)

Attributes

quality_of_service

(experimental) The Quality of Service (QoS) level to use when republishing messages.

Default:

MqttQualityOfService.ZERO_OR_MORE_TIMES

See:

https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-qos

Stability:

experimental

role

(experimental) The IAM role that allows access to AWS service.

Default:

a new role will be created

Stability:

experimental