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

*****************
list_sub_channels
*****************



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

  

  Lists all the SubChannels in an elastic channel when given a channel ID. Available only to the app instance admins and channel moderators of elastic channels.

  

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


  **Request Syntax**
  ::

    response = client.list_sub_channels(
        ChannelArn='string',
        ChimeBearer='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type ChannelArn: string
  :param ChannelArn: **[REQUIRED]** 

    The ARN of elastic channel.

    

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

    The ``AppInstanceUserArn`` of the user making the API call.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of sub-channels that you want to return.

    

  
  :type NextToken: string
  :param NextToken: 

    The token passed by previous API calls until all requested sub-channels are returned.

    

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

    
    ::

      {
          'ChannelArn': 'string',
          'SubChannels': [
              {
                  'SubChannelId': 'string',
                  'MembershipCount': 123
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The ARN of elastic channel.

        
      

      - **SubChannels** *(list) --* 

        The information about each sub-channel.

        
        

        - *(dict) --* 

          Summary of the sub-channels associated with the elastic channel.

          
          

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

            The unique ID of a SubChannel.

            
          

          - **MembershipCount** *(integer) --* 

            The number of members in a SubChannel.

            
      
    
      

      - **NextToken** *(string) --* 

        The token passed by previous API calls until all requested sub-channels are returned.

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

  
  *   :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`

  