:doc:`IoTDataPlane <../../iot-data>` / Client / update_thing_shadow

*******************
update_thing_shadow
*******************



.. py:method:: IoTDataPlane.Client.update_thing_shadow(**kwargs)

  

  Updates the shadow for the specified thing.

   

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

   

  For more information, see `UpdateThingShadow <http://docs.aws.amazon.com/iot/latest/developerguide/API_UpdateThingShadow.html>`__ in the IoT Developer Guide.

  

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


  **Request Syntax**
  ::

    response = client.update_thing_shadow(
        thingName='string',
        shadowName='string',
        payload=b'bytes'|file
    )
    
  :type thingName: string
  :param thingName: **[REQUIRED]** 

    The name of the thing.

    

  
  :type shadowName: string
  :param shadowName: 

    The name of the shadow.

    

  
  :type payload: bytes or seekable file-like object
  :param payload: **[REQUIRED]** 

    The state information, in JSON format.

    

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

    
    ::

      {
          'payload': StreamingBody()
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The output from the UpdateThingShadow operation.

      
      

      - **payload** (:class:`.StreamingBody`) -- 

        The state information, in JSON format.

        
  
  **Exceptions**
  
  *   :py:class:`IoTDataPlane.Client.exceptions.ConflictException`

  
  *   :py:class:`IoTDataPlane.Client.exceptions.RequestEntityTooLargeException`

  
  *   :py:class:`IoTDataPlane.Client.exceptions.InvalidRequestException`

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

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

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

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

  
  *   :py:class:`IoTDataPlane.Client.exceptions.MethodNotAllowedException`

  
  *   :py:class:`IoTDataPlane.Client.exceptions.UnsupportedDocumentEncodingException`

  