:doc:`CodeCommit <../../codecommit>` / Client / list_branches

*************
list_branches
*************



.. py:method:: CodeCommit.Client.list_branches(**kwargs)

  

  Gets information about one or more branches in a repository.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListBranches>`_  


  **Request Syntax**
  ::

    response = client.list_branches(
        repositoryName='string',
        nextToken='string'
    )
    
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository that contains the branches.

    

  
  :type nextToken: string
  :param nextToken: 

    An enumeration token that allows the operation to batch the results.

    

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

    
    ::

      {
          'branches': [
              'string',
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output of a list branches operation.

      
      

      - **branches** *(list) --* 

        The list of branch names.

        
        

        - *(string) --* 
    
      

      - **nextToken** *(string) --* 

        An enumeration token that returns the batch of the results.

        
  
  **Exceptions**
  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryNameRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidRepositoryNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyDisabledException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyNotFoundException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyUnavailableException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidContinuationTokenException`

  