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

*************************
delete_channel_membership
*************************



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

  

  Removes a member from a channel.

   

  .. note::

    

    The ``x-amz-chime-bearer`` request header is mandatory. Use the ``AppInstanceUserArn`` of the user 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/DeleteChannelMembership>`_  


  **Request Syntax**
  ::

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

    The ARN of the channel from which you want to remove the user.

    

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

    The ``AppInstanceUserArn`` of the member that you're removing from the channel.

    

  
  :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 for use by moderators.

      

    

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

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

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

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

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

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

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

  