IoT1ClickDevicesService / Client / list_device_events

list_device_events#

IoT1ClickDevicesService.Client.list_device_events(**kwargs)#

Using a device ID, returns a DeviceEventsResponse object containing an array of events for the device.

See also: AWS API Documentation

Request Syntax

response = client.list_device_events(
    DeviceId='string',
    FromTimeStamp=datetime(2015, 1, 1),
    MaxResults=123,
    NextToken='string',
    ToTimeStamp=datetime(2015, 1, 1)
)
Parameters:
  • DeviceId (string) –

    [REQUIRED]

    The unique identifier of the device.

  • FromTimeStamp (datetime) –

    [REQUIRED]

    The start date for the device event query, in ISO8061 format. For example, 2018-03-28T15:45:12.880Z

  • MaxResults (integer) – The maximum number of results to return per request. If not set, a default value of 100 is used.

  • NextToken (string) – The token to retrieve the next set of results.

  • ToTimeStamp (datetime) –

    [REQUIRED]

    The end date for the device event query, in ISO8061 format. For example, 2018-03-28T15:45:12.880Z

Return type:

dict

Returns:

Response Syntax

{
    'Events': [
        {
            'Device': {
                'Attributes': {},
                'DeviceId': 'string',
                'Type': 'string'
            },
            'StdEvent': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    200 response

    • Events (list) –

      An array of zero or more elements describing the event(s) associated with the device.

      • (dict) –

        • Device (dict) –

          An object representing the device associated with the event.

          • Attributes (dict) –

            The user specified attributes associated with the device for an event.

          • DeviceId (string) –

            The unique identifier of the device.

          • Type (string) –

            The device type, such as “button”.

        • StdEvent (string) –

          A serialized JSON object representing the device-type specific event.

    • NextToken (string) –

      The token to retrieve the next set of results.

Exceptions

  • IoT1ClickDevicesService.Client.exceptions.ResourceNotFoundException

  • IoT1ClickDevicesService.Client.exceptions.RangeNotSatisfiableException

  • IoT1ClickDevicesService.Client.exceptions.InvalidRequestException

  • IoT1ClickDevicesService.Client.exceptions.InternalFailureException