AWS IoT Data Plane

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.

ListNamedShadowsForThing (new) Link ¶

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
)
type thingName

string

param thingName

[REQUIRED]

The name of the thing.

type nextToken

string

param nextToken

The token to retrieve the next set of results.

type pageSize

integer

param pageSize

The result page size.

rtype

dict

returns

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.

DeleteThingShadow (updated) Link ¶
Changes (request)
{'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'
)
type thingName

string

param thingName

[REQUIRED]

The name of the thing.

type shadowName

string

param shadowName

The name of the shadow.

rtype

dict

returns

Response Syntax

{
    'payload': StreamingBody()
}

Response Structure

  • (dict) --

    The output from the DeleteThingShadow operation.

GetThingShadow (updated) Link ¶
Changes (request)
{'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'
)
type thingName

string

param thingName

[REQUIRED]

The name of the thing.

type shadowName

string

param shadowName

The name of the shadow.

rtype

dict

returns

Response Syntax

{
    'payload': StreamingBody()
}

Response Structure

  • (dict) --

    The output from the GetThingShadow operation.

UpdateThingShadow (updated) Link ¶
Changes (request)
{'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
)
type thingName

string

param thingName

[REQUIRED]

The name of the thing.

type shadowName

string

param shadowName

The name of the shadow.

type payload

bytes or seekable file-like object

param payload

[REQUIRED]

The state information, in JSON format.

rtype

dict

returns

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.