AWS IoT 1-Click
Devices API Reference

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

Name Type Required Description
deviceId String True

The unique identifier of the device.

Responses

Status Code Response Model Description
200 Empty

200 response

400 InvalidRequestException

400 response

404 ResourceNotFoundException

404 response

500 InternalFailureException

500 response

See Also

OPTIONS

Responses

Status Code Response Model Description
200 None

200 response

Schemas

Request Bodies

Example PUT

{ "enabled": boolean }

Response Bodies

Example Empty

{ }

Example InvalidRequestException

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

Example ResourceNotFoundException

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

Example InternalFailureException

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

Properties

Empty

On success, an empty object is returned.

Property Type Required Description

See Also

InternalFailureException

Property Type Required Description
code

string

False

500

message

string

False

The 500 error message returned by the web server.

See Also

InvalidRequestException

Property Type Required Description
code

string

False

400

message

string

False

The 400 error message returned by the web server.

See Also

ResourceNotFoundException

Property Type Required Description
code

string

False

404

message

string

False

The requested device could not be found.

See Also

UpdateDeviceStateRequest

Property Type Required Description
enabled

boolean

False

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

See Also