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

********************
list_recommendations
********************



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

  

  Returns the list of all recommendations for a completed code review.

  

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


  **Request Syntax**
  ::

    response = client.list_recommendations(
        NextToken='string',
        MaxResults=123,
        CodeReviewArn='string'
    )
    
  :type NextToken: string
  :param NextToken: 

    Pagination token.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results that are returned per call. The default is 100.

    

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

    The Amazon Resource Name (ARN) of the `CodeReview <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html>`__ object.

    

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

    
    ::

      {
          'RecommendationSummaries': [
              {
                  'FilePath': 'string',
                  'RecommendationId': 'string',
                  'StartLine': 123,
                  'EndLine': 123,
                  'Description': 'string',
                  'RecommendationCategory': 'AWSBestPractices'|'AWSCloudFormationIssues'|'DuplicateCode'|'CodeMaintenanceIssues'|'ConcurrencyIssues'|'InputValidations'|'PythonBestPractices'|'JavaBestPractices'|'ResourceLeaks'|'SecurityIssues'|'CodeInconsistencies',
                  'RuleMetadata': {
                      'RuleId': 'string',
                      'RuleName': 'string',
                      'ShortDescription': 'string',
                      'LongDescription': 'string',
                      'RuleTags': [
                          'string',
                      ]
                  },
                  'Severity': 'Info'|'Low'|'Medium'|'High'|'Critical'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RecommendationSummaries** *(list) --* 

        List of recommendations for the requested code review.

        
        

        - *(dict) --* 

          Information about recommendations.

          
          

          - **FilePath** *(string) --* 

            Name of the file on which a recommendation is provided.

            
          

          - **RecommendationId** *(string) --* 

            The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect the feedback.

            
          

          - **StartLine** *(integer) --* 

            Start line from where the recommendation is applicable in the source commit or source branch.

            
          

          - **EndLine** *(integer) --* 

            Last line where the recommendation is applicable in the source commit or source branch. For a single line comment the start line and end line values are the same.

            
          

          - **Description** *(string) --* 

            A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start line and the end line.

            
          

          - **RecommendationCategory** *(string) --* 

            The type of a recommendation.

            
          

          - **RuleMetadata** *(dict) --* 

            Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long description. CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis results if code is detected that violates the rule.

            
            

            - **RuleId** *(string) --* 

              The ID of the rule.

              
            

            - **RuleName** *(string) --* 

              The name of the rule.

              
            

            - **ShortDescription** *(string) --* 

              A short description of the rule.

              
            

            - **LongDescription** *(string) --* 

              A long description of the rule.

              
            

            - **RuleTags** *(list) --* 

              Tags that are associated with the rule.

              
              

              - *(string) --* 
          
        
          

          - **Severity** *(string) --* 

            The severity of the issue in the code that generated this recommendation.

            
      
    
      

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

        Pagination token.

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

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

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

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

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

  