:doc:`ChimeSDKMessaging <../../chime-sdk-messaging>` / Client / update_channel_message

**********************
update_channel_message
**********************



.. py:method:: ChimeSDKMessaging.Client.update_channel_message(**kwargs)

  

  Updates the content of a message.

   

  .. note::

    

    The ``x-amz-chime-bearer`` request header is mandatory. Use the ARN of the ``AppInstanceUser`` or ``AppInstanceBot`` that makes the API call as the value in the header.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/UpdateChannelMessage>`_  


  **Request Syntax**
  ::

    response = client.update_channel_message(
        ChannelArn='string',
        MessageId='string',
        Content='string',
        Metadata='string',
        ChimeBearer='string',
        SubChannelId='string',
        ContentType='string'
    )
    
  :type ChannelArn: string
  :param ChannelArn: **[REQUIRED]** 

    The ARN of the channel.

    

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

    The ID string of the message being updated.

    

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

    The content of the channel message.

    

  
  :type Metadata: string
  :param Metadata: 

    The metadata of the message being updated.

    

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

    The ARN of the ``AppInstanceUser`` or ``AppInstanceBot`` that makes the API call.

    

  
  :type SubChannelId: string
  :param SubChannelId: 

    The ID of the SubChannel in the request.

     

    .. note::

      

      Only required when updating messages in a SubChannel that the user belongs to.

      

    

  
  :type ContentType: string
  :param ContentType: 

    The content type of the channel message.

    

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

    
    ::

      {
          'ChannelArn': 'string',
          'MessageId': 'string',
          'Status': {
              'Value': 'SENT'|'PENDING'|'FAILED'|'DENIED',
              'Detail': 'string'
          },
          'SubChannelId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ChannelArn** *(string) --* 

        The ARN of the channel.

        
      

      - **MessageId** *(string) --* 

        The ID string of the message being updated.

        
      

      - **Status** *(dict) --* 

        The status of the message update.

        
        

        - **Value** *(string) --* 

          The message status value.

          
        

        - **Detail** *(string) --* 

          Contains more details about the message status.

          
    
      

      - **SubChannelId** *(string) --* 

        The ID of the SubChannel in the response.

        
  
  **Exceptions**
  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.BadRequestException`

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.ConflictException`

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.ForbiddenException`

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException`

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.ThrottledClientException`

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

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.ServiceFailureException`

  