Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PublishCommand

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.

example

Use a bare-bones client and the command you need to make an API call.

import { IoTDataPlaneClient, PublishCommand } from "@aws-sdk/client-iot-data-plane"; // ES Modules import
// const { IoTDataPlaneClient, PublishCommand } = require("@aws-sdk/client-iot-data-plane"); // CommonJS import
const client = new IoTDataPlaneClient(config);
const command = new PublishCommand(input);
const response = await client.send(command);
see

PublishCommandInput for command's input shape.

see

PublishCommandOutput for command's response shape.

see

config for IoTDataPlaneClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: PublishCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<PublishCommandInput, PublishCommandOutput>