IoT / Client / get_thing_connectivity_data
get_thing_connectivity_data#
- IoT.Client.get_thing_connectivity_data(**kwargs)#
Retrieves the live connectivity status per device.
See also: AWS API Documentation
Request Syntax
response = client.get_thing_connectivity_data( thingName='string' )
- Parameters:
thingName (string) –
[REQUIRED]
The name of your IoT thing.
- Return type:
dict
- Returns:
Response Syntax
{ 'thingName': 'string', 'connected': True|False, 'timestamp': datetime(2015, 1, 1), 'disconnectReason': 'AUTH_ERROR'|'CLIENT_INITIATED_DISCONNECT'|'CLIENT_ERROR'|'CONNECTION_LOST'|'DUPLICATE_CLIENTID'|'FORBIDDEN_ACCESS'|'MQTT_KEEP_ALIVE_TIMEOUT'|'SERVER_ERROR'|'SERVER_INITIATED_DISCONNECT'|'THROTTLED'|'WEBSOCKET_TTL_EXPIRATION'|'CUSTOMAUTH_TTL_EXPIRATION'|'UNKNOWN'|'NONE' }
Response Structure
(dict) –
thingName (string) –
The name of your IoT thing.
connected (boolean) –
A Boolean that indicates the connectivity status.
timestamp (datetime) –
The timestamp of when the event occurred.
disconnectReason (string) –
The reason why the client is disconnecting.
Exceptions
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.ThrottlingException
IoT.Client.exceptions.UnauthorizedException
IoT.Client.exceptions.ServiceUnavailableException
IoT.Client.exceptions.InternalFailureException
IoT.Client.exceptions.ResourceNotFoundException
IoT.Client.exceptions.IndexNotReadyException