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

**********************
detach_thing_principal
**********************



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

  

  Detaches the specified principal from the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

   

  .. note::

    

    This call is asynchronous. It might take several seconds for the detachment to propagate.

    

   

  Requires permission to access the `DetachThingPrincipal <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/DetachThingPrincipal>`_  


  **Request Syntax**
  ::

    response = client.detach_thing_principal(
        thingName='string',
        principal='string'
    )
    
  :type thingName: string
  :param thingName: **[REQUIRED]** 

    The name of the thing.

    

  
  :type principal: string
  :param principal: **[REQUIRED]** 

    If the principal is a certificate, this value must be ARN of the certificate. If the principal is an Amazon Cognito identity, this value must be the ID of the Amazon Cognito identity.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 

      The output from the DetachThingPrincipal operation.

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

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

  