interface IotRepublishMqttActionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoT.Actions.IotRepublishMqttActionProps |
Java | software.amazon.awscdk.services.iot.actions.IotRepublishMqttActionProps |
Python | aws_cdk.aws_iot_actions.IotRepublishMqttActionProps |
TypeScript (source) | @aws-cdk/aws-iot-actions » IotRepublishMqttActionProps |
Configuration properties of an action to republish MQTT messages.
Example
new iot.TopicRule(this, 'TopicRule', {
sql: iot.IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id, timestamp() as timestamp, temperature FROM 'device/+/data'"),
actions: [
new actions.IotRepublishMqttAction('${topic()}/republish', {
qualityOfService: actions.MqttQualityOfService.AT_LEAST_ONCE, // optional property, default is MqttQualityOfService.ZERO_OR_MORE_TIMES
}),
],
});
Properties
Name | Type | Description |
---|---|---|
quality | Mqtt | The Quality of Service (QoS) level to use when republishing messages. |
role? | IRole | The IAM role that allows access to AWS service. |
qualityOfService?
Type:
Mqtt
(optional, default: MqttQualityOfService.ZERO_OR_MORE_TIMES)
The Quality of Service (QoS) level to use when republishing messages.
See also: https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-qos
role?
Type:
IRole
(optional, default: a new role will be created)
The IAM role that allows access to AWS service.