:doc:`CloudTrail <../../cloudtrail>` / Client / list_channels

*************
list_channels
*************



.. py:method:: CloudTrail.Client.list_channels(**kwargs)

  

  Lists the channels in the current account, and their source names.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels>`_  


  **Request Syntax**
  ::

    response = client.list_channels(
        MaxResults=123,
        NextToken='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of CloudTrail channels to display on a single page.

    

  
  :type NextToken: string
  :param NextToken: 

    The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

    

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

    
    ::

      {
          'Channels': [
              {
                  'ChannelArn': 'string',
                  'Name': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Channels** *(list) --* 

        The list of channels in the account.

        
        

        - *(dict) --* 

          Contains information about a returned CloudTrail channel.

          
          

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

            The Amazon Resource Name (ARN) of a channel.

            
          

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

            The name of the CloudTrail channel. For service-linked channels, the name is ``aws-service-channel/service-name/custom-suffix`` where ``service-name`` represents the name of the Amazon Web Services service that created the channel and ``custom-suffix`` represents the suffix created by the Amazon Web Services service.

            
      
    
      

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

        The token to use to get the next page of results after a previous API call.

        
  
  **Exceptions**
  
  *   :py:class:`CloudTrail.Client.exceptions.InvalidNextTokenException`

  
  *   :py:class:`CloudTrail.Client.exceptions.OperationNotPermittedException`

  
  *   :py:class:`CloudTrail.Client.exceptions.UnsupportedOperationException`

  