Publishes an MQTT message.
Requires permission to access the Publish action.
For more information about MQTT messages, see MQTT Protocol in the IoT Developer Guide.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
Path parameters
The name of the MQTT topic.
Query parameters
The Quality of Service (QoS) level. The default QoS level is 0.
A UTF-8 encoded string that describes the content of the publishing message.
A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters.
A user-defined integer value that represents the message expiry interval in seconds. If absent, the message doesn't expire. For more information about the limits of <code>messageExpiry</code>, see <a href="https://docs.aws.amazon.com/general/latest/gr/iot-core.html#message-broker-limits">Amazon Web Services IoT Core message broker and protocol limits and quotas </a> from the Amazon Web Services Reference Guide.
Headers
An <code>Enum</code> string value that indicates whether the payload is formatted as UTF-8. <code>payloadFormatIndicator</code> is an HTTP header value in the API.
The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received. <code>correlationData</code> is an HTTP header value in the API.
Request body
Response
Success