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

************
delete_thing
************



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

  

  Deletes the specified thing. Returns successfully with no error if the deletion is successful or you specify a thing that doesn't exist.

   

  Requires permission to access the `DeleteThing <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

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


  **Request Syntax**
  ::

    response = client.delete_thing(
        thingName='string',
        expectedVersion=123
    )
    
  :type thingName: string
  :param thingName: **[REQUIRED]** 

    The name of the thing to delete.

    

  
  :type expectedVersion: integer
  :param expectedVersion: 

    The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the ``DeleteThing`` request is rejected with a ``VersionConflictException``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 

      The output of the DeleteThing operation.

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

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

  
  *   :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`

  