aws-cdk-lib.aws_iotevents.CfnDetectorModel.IotTopicPublishProperty

interface IotTopicPublishProperty

LanguageType name
.NETAmazon.CDK.AWS.IoTEvents.CfnDetectorModel.IotTopicPublishProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsiotevents#CfnDetectorModel_IotTopicPublishProperty
Javasoftware.amazon.awscdk.services.iotevents.CfnDetectorModel.IotTopicPublishProperty
Pythonaws_cdk.aws_iotevents.CfnDetectorModel.IotTopicPublishProperty
TypeScript aws-cdk-lib » aws_iotevents » CfnDetectorModel » IotTopicPublishProperty

Information required to publish the MQTT message through the AWS IoT message broker.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotevents as iotevents } from 'aws-cdk-lib';
const iotTopicPublishProperty: iotevents.CfnDetectorModel.IotTopicPublishProperty = {
  mqttTopic: 'mqttTopic',

  // the properties below are optional
  payload: {
    contentExpression: 'contentExpression',
    type: 'type',
  },
};

Properties

NameTypeDescription
mqttTopicstringThe MQTT topic of the message.
payload?IResolvable | PayloadPropertyYou can configure the action payload when you publish a message to an AWS IoT Core topic.

mqttTopic

Type: string

The MQTT topic of the message.

You can use a string expression that includes variables ( $variable.<variable-name> ) and input values ( $input.<input-name>.<path-to-datum> ) as the topic string.


payload?

Type: IResolvable | PayloadProperty (optional)

You can configure the action payload when you publish a message to an AWS IoT Core topic.