:doc:`IoT <../../iot>` / Client / get_thing_connectivity_data

***************************
get_thing_connectivity_data
***************************



.. py:method:: IoT.Client.get_thing_connectivity_data(**kwargs)

  

  Retrieves the live connectivity status per device.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/GetThingConnectivityData>`_  


  **Request Syntax**
  ::

    response = 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.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoT.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoT.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`IoT.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoT.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoT.Client.exceptions.IndexNotReadyException`

  