AWS IoT

2024/12/18 - AWS IoT - 1 new api methods

Changes  Release connectivity status query API which is a dedicated high throughput(TPS) API to query a specific device's most recent connectivity state and metadata.

GetThingConnectivityData (new) Link ΒΆ

Retrieves the live connectivity status per device.

See also: AWS API Documentation

Request Syntax

client.get_thing_connectivity_data(
    thingName='string'
)
type thingName:

string

param thingName:

[REQUIRED]

The name of your IoT thing.

rtype:

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.