DeleteOTAUpdateCommand

Delete an OTA update.

Requires permission to access the DeleteOTAUpdate  action.

Example Syntax

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

import { IoTClient, DeleteOTAUpdateCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, DeleteOTAUpdateCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // DeleteOTAUpdateRequest
  otaUpdateId: "STRING_VALUE", // required
  deleteStream: true || false,
  forceDeleteAWSJob: true || false,
};
const command = new DeleteOTAUpdateCommand(input);
const response = await client.send(command);
// {};

DeleteOTAUpdateCommand Input

See DeleteOTAUpdateCommandInput for more details

Parameter
Type
Description
otaUpdateId
Required
string | undefined

The ID of the OTA update to delete.

deleteStream
boolean | undefined

When true, the stream created by the OTAUpdate process is deleted when the OTA update is deleted. Ignored if the stream specified in the OTAUpdate is supplied by the user.

forceDeleteAWSJob
boolean | undefined

When true, deletes the IoT job created by the OTAUpdate process even if it is "IN_PROGRESS". Otherwise, if the job is not in a terminal state ("COMPLETED" or "CANCELED") an exception will occur. The default is false.

DeleteOTAUpdateCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InternalFailureException
server

An unexpected error has occurred.

InvalidRequestException
client

The request is not valid.

ResourceNotFoundException
client

The specified resource does not exist.

ServiceUnavailableException
server

The service is temporarily unavailable.

ThrottlingException
client

The rate exceeds the limit.

UnauthorizedException
client

You are not authorized to perform this operation.

VersionConflictException
client

An exception thrown when the version of an entity specified with the expectedVersion parameter does not match the latest version in the system.

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