:doc:`CodeGuruReviewer <../../codeguru-reviewer>` / Client / list_repository_associations

****************************
list_repository_associations
****************************



.. py:method:: CodeGuruReviewer.Client.list_repository_associations(**kwargs)

  

  Returns a list of `RepositoryAssociationSummary <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html>`__ objects that contain summary information about a repository association. You can filter the returned list by `ProviderType <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-ProviderType>`__, `Name <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Name>`__, `State <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-State>`__, and `Owner <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Owner>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRepositoryAssociations>`_  


  **Request Syntax**
  ::

    response = client.list_repository_associations(
        ProviderTypes=[
            'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer'|'S3Bucket',
        ],
        States=[
            'Associated'|'Associating'|'Failed'|'Disassociating'|'Disassociated',
        ],
        Names=[
            'string',
        ],
        Owners=[
            'string',
        ],
        MaxResults=123,
        NextToken='string'
    )
    
  :type ProviderTypes: list
  :param ProviderTypes: 

    List of provider types to use as a filter.

    

  
    - *(string) --* 

    

  :type States: list
  :param States: 

    List of repository association states to use as a filter.

     

    The valid repository association states are:

     

    
    * **Associated**: The repository association is complete.
     
    * **Associating**: CodeGuru Reviewer is: 

      
      * Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review. 

      .. note::

        If your repository ``ProviderType`` is ``GitHub``, ``GitHub Enterprise Server``, or ``Bitbucket``, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.

      
       
      * Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
      

    
     
    * **Failed**: The repository failed to associate or disassociate.
     
    * **Disassociating**: CodeGuru Reviewer is removing the repository's pull request notifications and source code access.
     
    * **Disassociated**: CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in anassociated repository with tags after it has been disassociated. For more information, see `Using tags to control access to associated repositories <https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html>`__ in the *Amazon CodeGuru Reviewer User Guide*.
    

    

  
    - *(string) --* 

    

  :type Names: list
  :param Names: 

    List of repository names to use as a filter.

    

  
    - *(string) --* 

    

  :type Owners: list
  :param Owners: 

    List of owners to use as a filter. For Amazon Web Services CodeCommit, it is the name of the CodeCommit account that was used to associate the repository. For other repository source providers, such as Bitbucket and GitHub Enterprise Server, this is name of the account that was used to associate the repository.

    

  
    - *(string) --* 

    

  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of repository association results returned by ``ListRepositoryAssociations`` in paginated output. When this parameter is used, ``ListRepositoryAssociations`` only returns ``maxResults`` results in a single page with a ``nextToken`` response element. The remaining results of the initial request can be seen by sending another ``ListRepositoryAssociations`` request with the returned ``nextToken`` value. This value can be between 1 and 100. If this parameter is not used, ``ListRepositoryAssociations`` returns up to 100 results and a ``nextToken`` value if applicable.

    

  
  :type NextToken: string
  :param NextToken: 

    The ``nextToken`` value returned from a previous paginated ``ListRepositoryAssociations`` request where ``maxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``nextToken`` value.

     

    .. note::

      

      Treat this token as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

      

    

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

    
    ::

      {
          'RepositoryAssociationSummaries': [
              {
                  'AssociationArn': 'string',
                  'ConnectionArn': 'string',
                  'LastUpdatedTimeStamp': datetime(2015, 1, 1),
                  'AssociationId': 'string',
                  'Name': 'string',
                  'Owner': 'string',
                  'ProviderType': 'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer'|'S3Bucket',
                  'State': 'Associated'|'Associating'|'Failed'|'Disassociating'|'Disassociated'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RepositoryAssociationSummaries** *(list) --* 

        A list of repository associations that meet the criteria of the request.

        
        

        - *(dict) --* 

          Summary information about a repository association. The `ListRepositoryAssociations <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html>`__ operation returns a list of ``RepositoryAssociationSummary`` objects.

          
          

          - **AssociationArn** *(string) --* 

            The Amazon Resource Name (ARN) of the `RepositoryAssociation <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html>`__ object. You can retrieve this ARN by calling `ListRepositoryAssociations <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html>`__.

            
          

          - **ConnectionArn** *(string) --* 

            The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is ``arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id``. For more information, see `Connection <https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html>`__ in the *Amazon Web Services CodeStar Connections API Reference*.

            
          

          - **LastUpdatedTimeStamp** *(datetime) --* 

            The time, in milliseconds since the epoch, since the repository association was last updated.

            
          

          - **AssociationId** *(string) --* 

            The repository association ID.

            
          

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

            The name of the repository association.

            
          

          - **Owner** *(string) --* 

            The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.

            
          

          - **ProviderType** *(string) --* 

            The provider type of the repository association.

            
          

          - **State** *(string) --* 

            The state of the repository association.

             

            The valid repository association states are:

             

            
            * **Associated**: The repository association is complete.
             
            * **Associating**: CodeGuru Reviewer is: 

              
              * Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review. 

              .. note::

                If your repository ``ProviderType`` is ``GitHub``, ``GitHub Enterprise Server``, or ``Bitbucket``, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.

              
               
              * Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
              

            
             
            * **Failed**: The repository failed to associate or disassociate.
             
            * **Disassociating**: CodeGuru Reviewer is removing the repository's pull request notifications and source code access.
             
            * **Disassociated**: CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in anassociated repository with tags after it has been disassociated. For more information, see `Using tags to control access to associated repositories <https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html>`__ in the *Amazon CodeGuru Reviewer User Guide*.
            

            
      
    
      

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

        The ``nextToken`` value to include in a future ``ListRecommendations`` request. When the results of a ``ListRecommendations`` request exceed ``maxResults``, this value can be used to retrieve the next page of results. This value is ``null`` when there are no more results to return.

        
  
  **Exceptions**
  
  *   :py:class:`CodeGuruReviewer.Client.exceptions.InternalServerException`

  
  *   :py:class:`CodeGuruReviewer.Client.exceptions.ValidationException`

  
  *   :py:class:`CodeGuruReviewer.Client.exceptions.ThrottlingException`

  