Menu
AWS IoT
Developer Guide

DeleteThing

Deletes the specified thing.

Request syntax:

DELETE /things/thingName?expectedVersion=expectedVersion

URI Request Parameters:

Name

Type

Req?

Description

thingName

ThingName

yes

The name of the thing to delete.

expectedVersion

OptionalVersion

no

The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the DeleteThing request is rejected with a VersionConflictException.

Errors:

ResourceNotFoundException

The specified resource does not exist.

HTTP response code: 404

VersionConflictException

An exception thrown when the version of a thing passed to a command is different than the version specified with the --version parameter.

HTTP response code: 409

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

HTTP response code: 400

ThrottlingException

The rate exceeds the limit.

HTTP response code: 429

UnauthorizedException

You are not authorized to perform this operation.

HTTP response code: 401

ServiceUnavailableException

The service is temporarily unavailable.

HTTP response code: 503

InternalFailureException

An unexpected error has occurred.

HTTP response code: 500

CLI

Synopsis:

aws iot delete-thing \ --thing-name <value> \ [--expected-version <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "thingName": "string", "expectedVersion": "long" }

cli-input-json fields:

Name

Type

Description

thingName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

The name of the thing to delete.

expectedVersion

long

java class: java.lang.Long

The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the DeleteThing request is rejected with a VersionConflictException.

Output:

None

On this page: