Device State - AWS IoT 1-Click

Device State

Represents the device's state.

URI

/devices/deviceId/state

HTTP methods

PUT

Operation ID: UpdateDeviceState

Using a Boolean value (true or false), this operation enables or disables the device given a device ID.

Path parameters
NameTypeRequiredDescription
deviceIdStringTrue

The unique identifier of the device.

Responses
Status codeResponse modelDescription
200 Empty

200 response

400InvalidRequestException

400 response

404ResourceNotFoundException

404 response

500InternalFailureException

500 response

OPTIONS

Responses
Status codeResponse modelDescription
200None

200 response

Schemas

Request bodies

{ "enabled": boolean }

Response bodies

{ }
{ "code": "string", "message": "string" }
{ "code": "string", "message": "string" }
{ "code": "string", "message": "string" }

Properties

Empty

On success, an empty object is returned.

InternalFailureException

PropertyTypeRequiredDescription
code

string

False

500

message

string

False

The 500 error message returned by the web server.

InvalidRequestException

PropertyTypeRequiredDescription
code

string

False

400

message

string

False

The 400 error message returned by the web server.

ResourceNotFoundException

PropertyTypeRequiredDescription
code

string

False

404

message

string

False

The requested device could not be found.

UpdateDeviceStateRequest

PropertyTypeRequiredDescription
enabled

boolean

False

If true, the device is enabled. If false, the device is disabled.

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

UpdateDeviceState