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

**********************
redact_channel_message
**********************



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

  

  Redacts message content and metadata. The message exists in the back end, but the action returns null content, and the state shows as redacted.

   

  .. 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/RedactChannelMessage>`_  


  **Request Syntax**
  ::

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

    The ARN of the channel containing the messages that you want to redact.

    

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

    The ID of the message being redacted.

    

  
  :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.

    

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

    
    ::

      {
          'ChannelArn': 'string',
          'MessageId': 'string',
          'SubChannelId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The ARN of the channel containing the messages that you want to redact.

        
      

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

        The ID of the message being redacted.

        
      

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

        The ID of the SubChannel in the response.

         

        .. note::

          

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

          

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

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

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

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

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

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

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

  