AlexaForBusiness / Client / list_device_events
list_device_events#
- AlexaForBusiness.Client.list_device_events(**kwargs)#
Lists the device event history, including device connection status, for up to 30 days.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.list_device_events( DeviceArn='string', EventType='CONNECTION_STATUS'|'DEVICE_STATUS', NextToken='string', MaxResults=123 )
- Parameters:
DeviceArn (string) –
[REQUIRED]
The ARN of a device.
EventType (string) – The event type to filter device events. If EventType isn’t specified, this returns a list of all device events in reverse chronological order. If EventType is specified, this returns a list of device events for that EventType in reverse chronological order.
NextToken (string) – An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response only includes results beyond the token, up to the value specified by MaxResults. When the end of results is reached, the response has a value of null.
MaxResults (integer) – The maximum number of results to include in the response. The default value is 50. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
- Return type:
dict
- Returns:
Response Syntax
{ 'DeviceEvents': [ { 'Type': 'CONNECTION_STATUS'|'DEVICE_STATUS', 'Value': 'string', 'Timestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) –
DeviceEvents (list) –
The device events requested for the device ARN.
(dict) –
The list of device events.
Type (string) –
The type of device event.
Value (string) –
The value of the event.
Timestamp (datetime) –
The time (in epoch) when the event occurred.
NextToken (string) –
The token returned to indicate that there is more data available.
Exceptions
AlexaForBusiness.Client.exceptions.NotFoundException