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

***************************
describe_channel_membership
***************************



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

  

  Returns the full details of a user's channel membership.

   

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


  **Request Syntax**
  ::

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

    The ARN of the channel.

    

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

    The ``AppInstanceUserArn`` of the member.

    

  
  :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. The response contains an ``ElasticChannelConfiguration`` object.

     

    .. note::

      

      Only required to get a user’s SubChannel membership details.

      

    

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

    
    ::

      {
          'ChannelMembership': {
              'InvitedBy': {
                  'Arn': 'string',
                  'Name': 'string'
              },
              'Type': 'DEFAULT'|'HIDDEN',
              'Member': {
                  'Arn': 'string',
                  'Name': 'string'
              },
              'ChannelArn': 'string',
              'CreatedTimestamp': datetime(2015, 1, 1),
              'LastUpdatedTimestamp': datetime(2015, 1, 1),
              'SubChannelId': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ChannelMembership** *(dict) --* 

        The details of the membership.

        
        

        - **InvitedBy** *(dict) --* 

          The identifier of the member who invited another member.

          
          

          - **Arn** *(string) --* 

            The ARN in an Identity.

            
          

          - **Name** *(string) --* 

            The name in an Identity.

            
      
        

        - **Type** *(string) --* 

          The membership type set for the channel member.

          
        

        - **Member** *(dict) --* 

          The data of the channel member.

          
          

          - **Arn** *(string) --* 

            The ARN in an Identity.

            
          

          - **Name** *(string) --* 

            The name in an Identity.

            
      
        

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

          The ARN of the member's channel.

          
        

        - **CreatedTimestamp** *(datetime) --* 

          The time at which the channel membership was created.

          
        

        - **LastUpdatedTimestamp** *(datetime) --* 

          The time at which a channel membership was last updated.

          
        

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

          The ID of the SubChannel that a user belongs to.

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

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

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

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

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

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

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

  