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

******************
list_pull_requests
******************



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

  

  Returns a list of pull requests for a specified repository. The return list can be refined by pull request status or pull request author ARN.

  

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


  **Request Syntax**
  ::

    response = client.list_pull_requests(
        repositoryName='string',
        authorArn='string',
        pullRequestStatus='OPEN'|'CLOSED',
        nextToken='string',
        maxResults=123
    )
    
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository for which you want to list pull requests.

    

  
  :type authorArn: string
  :param authorArn: 

    Optional. The Amazon Resource Name (ARN) of the user who created the pull request. If used, this filters the results to pull requests created by that user.

    

  
  :type pullRequestStatus: string
  :param pullRequestStatus: 

    Optional. The status of the pull request. If used, this refines the results to the pull requests that match the specified status.

    

  
  :type nextToken: string
  :param nextToken: 

    An enumeration token that, when provided in a request, returns the next batch of the results.

    

  
  :type maxResults: integer
  :param maxResults: 

    A non-zero, non-negative integer used to limit the number of returned results.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **pullRequestIds** *(list) --* 

        The system-generated IDs of the pull requests.

        
        

        - *(string) --* 
    
      

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

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

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

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

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

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

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

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

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

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

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

  