greengrasssdk.IoTDataPlane module

exception greengrasssdk.IoTDataPlane.ShadowError[source]

Bases: Exception

class greengrasssdk.IoTDataPlane.Client[source]

Bases: object

get_thing_shadow(**kwargs)[source]

Call shadow lambda to obtain current shadow state.

Keyword Arguments:
 
  • thingName (string) – [REQUIRED] The name of the thing.
Returns:

(dict) –

The output from the GetThingShadow operation
  • payload (bytes) – The state information, in JSON format.
update_thing_shadow(**kwargs)[source]

Updates the thing shadow for the specified thing.

Keyword Arguments:
 
  • thingName (string) – [REQUIRED] The name of the thing.
  • payload (bytes or seekable file-like object) – [REQUIRED] The state information, in JSON format.
Returns:

(dict) –

The output from the UpdateThingShadow operation
  • payload (bytes) – The state information, in JSON format.
delete_thing_shadow(**kwargs)[source]

Deletes the thing shadow for the specified thing.

Keyword Arguments:
 
  • thingName (string) – [REQUIRED] The name of the thing.
Returns:

(dict) –

The output from the DeleteThingShadow operation
  • payload (bytes) – The state information, in JSON format.
publish(**kwargs)[source]

Publishes state information.

Keyword Arguments:
 
  • topic (string) – [REQUIRED] The name of the MQTT topic.
  • payload (bytes or seekable file-like object) – The state information, in JSON format.
  • queueFullPolicy (string) – The policy for GGC to take when its internal queue is full
Returns:

None