UpdateCommandCommand

Update information about a command or mark a command for deprecation.

Example Syntax

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

import { IoTClient, UpdateCommandCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, UpdateCommandCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // UpdateCommandRequest
  commandId: "STRING_VALUE", // required
  displayName: "STRING_VALUE",
  description: "STRING_VALUE",
  deprecated: true || false,
};
const command = new UpdateCommandCommand(input);
const response = await client.send(command);
// { // UpdateCommandResponse
//   commandId: "STRING_VALUE",
//   displayName: "STRING_VALUE",
//   description: "STRING_VALUE",
//   deprecated: true || false,
//   lastUpdatedAt: new Date("TIMESTAMP"),
// };

UpdateCommandCommand Input

See UpdateCommandCommandInput for more details

Parameter
Type
Description
commandId
Required
string | undefined

The unique identifier of the command to be updated.

deprecated
boolean | undefined

A boolean that you can use to specify whether to deprecate a command.

description
string | undefined

A short text description of the command.

displayName
string | undefined

The new user-friendly name to use in the console for the command.

UpdateCommandCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
commandId
string | undefined

The unique identifier of the command.

deprecated
boolean | undefined

The boolean that indicates whether the command was deprecated.

description
string | undefined

The updated text description of the command.

displayName
string | undefined

The updated user-friendly display name in the console for the command.

lastUpdatedAt
Date | undefined

The date and time (epoch timestamp in seconds) when the command was last updated.

Throws

Name
Fault
Details
ConflictException
client

The request conflicts with the current state of the resource.

InternalServerException
server

Internal error from the service that indicates an unexpected error or that the service is unavailable.

ResourceNotFoundException
client

The specified resource does not exist.

ThrottlingException
client

The rate exceeds the limit.

ValidationException
client

The request is not valid.

IoTServiceException
Base exception class for all service exceptions from IoT service.