Menu
AWS IoT
Developer Guide

UpdateThingShadow

Updates the shadow for the specified thing.

For more information, see UpdateThingShadow in the AWS IoT Developer Guide.

Request syntax:

POST /things/thingName/shadow Content-type: application/json { "payload": "blob" }

URI Request Parameters:

Name

Type

Req?

Description

thingName

ThingName

yes

The name of the thing.

Request Body Parameters:

Name

Type

Req?

Description

payload

JsonDocument

yes

The state information, in JSON format.

Response syntax:

Content-type: application/json { "payload": "blob" }

Response Body Parameters:

Name

Type

Req?

Description

payload

JsonDocument

no

The state information, in JSON format.

Errors:

ConflictException

The specified version does not match the version of the document.

HTTP response code: 409

RequestEntityTooLargeException

The payload exceeds the maximum size allowed.

HTTP response code: 413

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

MethodNotAllowedException

The specified combination of HTTP verb and URI is not supported.

HTTP response code: 405

UnsupportedDocumentEncodingException

The encoding is not supported.

HTTP response code: 415

CLI

Synopsis:

aws iot-data update-thing-shadow \ --thing-name <value> \ --payload <value> \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "thingName": "string", "payload": "blob" }

cli-input-json fields:

Name

Type

Description

thingName

string

length max:128 min:1

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

The name of the thing.

payload

blob

The state information, in JSON format.

Output:

{ "payload": "blob" }

cli output fields:

Name

Type

Description

payload

blob

The state information, in JSON format.

On this page: