2020/06/11 - AWS IoT Data Plane - 1 new 3 updated api methods
Changes As part of this release, we are introducing a new feature called named shadow, which extends the capability of AWS IoT Device Shadow to support multiple shadows for a single IoT device. With this release, customers can store different device state data into different shadows, and as a result access only the required state data when needed and reduce individual shadow size.
Lists the shadows for the specified thing.
See also: AWS API Documentation
Request Syntax
client.list_named_shadows_for_thing( thingName='string', nextToken='string', pageSize=123 )
string
[REQUIRED]
The name of the thing.
string
The token to retrieve the next set of results.
integer
The result page size.
dict
Response Syntax
{ 'results': [ 'string', ], 'nextToken': 'string', 'timestamp': 123 }
Response Structure
(dict) --
results (list) --
The list of shadows for the specified thing.
(string) --
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
timestamp (integer) --
The Epoch date and time the response was generated by AWS IoT.
{'shadowName': 'string'}
Deletes the shadow for the specified thing.
For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
See also: AWS API Documentation
Request Syntax
client.delete_thing_shadow( thingName='string', shadowName='string' )
string
[REQUIRED]
The name of the thing.
string
The name of the shadow.
dict
Response Syntax
{ 'payload': StreamingBody() }
Response Structure
(dict) --
The output from the DeleteThingShadow operation.
payload (:class:`.StreamingBody`) --
The state information, in JSON format.
{'shadowName': 'string'}
Gets the shadow for the specified thing.
For more information, see GetThingShadow in the AWS IoT Developer Guide.
See also: AWS API Documentation
Request Syntax
client.get_thing_shadow( thingName='string', shadowName='string' )
string
[REQUIRED]
The name of the thing.
string
The name of the shadow.
dict
Response Syntax
{ 'payload': StreamingBody() }
Response Structure
(dict) --
The output from the GetThingShadow operation.
payload (:class:`.StreamingBody`) --
The state information, in JSON format.
{'shadowName': 'string'}
Updates the shadow for the specified thing.
For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
See also: AWS API Documentation
Request Syntax
client.update_thing_shadow( thingName='string', shadowName='string', payload=b'bytes'|file )
string
[REQUIRED]
The name of the thing.
string
The name of the shadow.
bytes or seekable file-like object
[REQUIRED]
The state information, in JSON format.
dict
Response Syntax
{ 'payload': b'bytes'|file }
Response Structure
(dict) --
The output from the UpdateThingShadow operation.
payload (bytes or seekable file-like object) --
The state information, in JSON format.