:doc:`CostOptimizationHub <../../cost-optimization-hub>` / Paginator / ListRecommendations

*******************
ListRecommendations
*******************



.. py:class:: CostOptimizationHub.Paginator.ListRecommendations

  ::

    
    paginator = client.get_paginator('list_recommendations')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`CostOptimizationHub.Client.list_recommendations`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cost-optimization-hub-2022-07-26/ListRecommendations>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          filter={
              'restartNeeded': True|False,
              'rollbackPossible': True|False,
              'implementationEfforts': [
                  'VeryLow'|'Low'|'Medium'|'High'|'VeryHigh',
              ],
              'accountIds': [
                  'string',
              ],
              'regions': [
                  'string',
              ],
              'resourceTypes': [
                  'Ec2Instance'|'LambdaFunction'|'EbsVolume'|'EcsService'|'Ec2AutoScalingGroup'|'Ec2InstanceSavingsPlans'|'ComputeSavingsPlans'|'SageMakerSavingsPlans'|'Ec2ReservedInstances'|'RdsReservedInstances'|'OpenSearchReservedInstances'|'RedshiftReservedInstances'|'ElastiCacheReservedInstances'|'RdsDbInstanceStorage'|'RdsDbInstance'|'AuroraDbClusterStorage'|'DynamoDbReservedCapacity'|'MemoryDbReservedInstances'|'NatGateway',
              ],
              'actionTypes': [
                  'Rightsize'|'Stop'|'Upgrade'|'PurchaseSavingsPlans'|'PurchaseReservedInstances'|'MigrateToGraviton'|'Delete'|'ScaleIn',
              ],
              'tags': [
                  {
                      'key': 'string',
                      'value': 'string'
                  },
              ],
              'resourceIds': [
                  'string',
              ],
              'resourceArns': [
                  'string',
              ],
              'recommendationIds': [
                  'string',
              ]
          },
          orderBy={
              'dimension': 'string',
              'order': 'Asc'|'Desc'
          },
          includeAllRecommendations=True|False,
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type filter: dict
    :param filter: 

      The constraints that you want all returned recommendations to match.

      

    
      - **restartNeeded** *(boolean) --* 

        Whether or not implementing the recommendation requires a restart.

        

      
      - **rollbackPossible** *(boolean) --* 

        Whether or not implementing the recommendation can be rolled back.

        

      
      - **implementationEfforts** *(list) --* 

        The effort required to implement the recommendation.

        

      
        - *(string) --* 

        
    
      - **accountIds** *(list) --* 

        The account to which the recommendation applies.

        

      
        - *(string) --* 

        
    
      - **regions** *(list) --* 

        The Amazon Web Services Region of the resource.

        

      
        - *(string) --* 

        
    
      - **resourceTypes** *(list) --* 

        The resource type of the recommendation.

        

      
        - *(string) --* 

        
    
      - **actionTypes** *(list) --* 

        The type of action you can take by adopting the recommendation.

        

      
        - *(string) --* 

        
    
      - **tags** *(list) --* 

        A list of tags assigned to the recommendation.

        

      
        - *(dict) --* 

          The tag structure that contains a tag key and value.

          

        
          - **key** *(string) --* 

            The key that's associated with the tag.

            

          
          - **value** *(string) --* 

            The value that's associated with the tag.

            

          
        
    
      - **resourceIds** *(list) --* 

        The resource ID of the recommendation.

        

      
        - *(string) --* 

        
    
      - **resourceArns** *(list) --* 

        The Amazon Resource Name (ARN) of the recommendation.

        

      
        - *(string) --* 

        
    
      - **recommendationIds** *(list) --* 

        The IDs for the recommendations.

        

      
        - *(string) --* 

        
    
    
    :type orderBy: dict
    :param orderBy: 

      The ordering of recommendations by a dimension.

      

    
      - **dimension** *(string) --* 

        Sorts by dimension values.

        

      
      - **order** *(string) --* 

        The order that's used to sort the data.

        

      
    
    :type includeAllRecommendations: boolean
    :param includeAllRecommendations: 

      List of all recommendations for a resource, or a single recommendation if de-duped by ``resourceId``.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

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

      
      ::

        {
            'items': [
                {
                    'recommendationId': 'string',
                    'accountId': 'string',
                    'region': 'string',
                    'resourceId': 'string',
                    'resourceArn': 'string',
                    'currentResourceType': 'string',
                    'recommendedResourceType': 'string',
                    'estimatedMonthlySavings': 123.0,
                    'estimatedSavingsPercentage': 123.0,
                    'estimatedMonthlyCost': 123.0,
                    'currencyCode': 'string',
                    'implementationEffort': 'string',
                    'restartNeeded': True|False,
                    'actionType': 'string',
                    'rollbackPossible': True|False,
                    'currentResourceSummary': 'string',
                    'recommendedResourceSummary': 'string',
                    'lastRefreshTimestamp': datetime(2015, 1, 1),
                    'recommendationLookbackPeriodInDays': 123,
                    'source': 'ComputeOptimizer'|'CostExplorer',
                    'tags': [
                        {
                            'key': 'string',
                            'value': 'string'
                        },
                    ]
                },
            ],
            'NextToken': 'string'
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **items** *(list) --* 

          List of all savings recommendations.

          
          

          - *(dict) --* 

            Describes a recommendation.

            
            

            - **recommendationId** *(string) --* 

              The ID for the recommendation.

              
            

            - **accountId** *(string) --* 

              The account to which the recommendation applies.

              
            

            - **region** *(string) --* 

              The Amazon Web Services Region of the resource.

              
            

            - **resourceId** *(string) --* 

              The resource ID for the recommendation.

              
            

            - **resourceArn** *(string) --* 

              The Amazon Resource Name (ARN) for the recommendation.

              
            

            - **currentResourceType** *(string) --* 

              The current resource type.

              
            

            - **recommendedResourceType** *(string) --* 

              The recommended resource type.

              
            

            - **estimatedMonthlySavings** *(float) --* 

              The estimated monthly savings amount for the recommendation.

              
            

            - **estimatedSavingsPercentage** *(float) --* 

              The estimated savings percentage relative to the total cost over the cost calculation lookback period.

              
            

            - **estimatedMonthlyCost** *(float) --* 

              The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage.

              
            

            - **currencyCode** *(string) --* 

              The currency code used for the recommendation.

              
            

            - **implementationEffort** *(string) --* 

              The effort required to implement the recommendation.

              
            

            - **restartNeeded** *(boolean) --* 

              Whether or not implementing the recommendation requires a restart.

              
            

            - **actionType** *(string) --* 

              The type of tasks that can be carried out by this action.

              
            

            - **rollbackPossible** *(boolean) --* 

              Whether or not implementing the recommendation can be rolled back.

              
            

            - **currentResourceSummary** *(string) --* 

              Describes the current resource.

              
            

            - **recommendedResourceSummary** *(string) --* 

              Describes the recommended resource.

              
            

            - **lastRefreshTimestamp** *(datetime) --* 

              The time when the recommendation was last generated.

              
            

            - **recommendationLookbackPeriodInDays** *(integer) --* 

              The lookback period that's used to generate the recommendation.

              
            

            - **source** *(string) --* 

              The source of the recommendation.

              
            

            - **tags** *(list) --* 

              A list of tags assigned to the recommendation.

              
              

              - *(dict) --* 

                The tag structure that contains a tag key and value.

                
                

                - **key** *(string) --* 

                  The key that's associated with the tag.

                  
                

                - **value** *(string) --* 

                  The value that's associated with the tag.

                  
            
          
        
      
        

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

          A token to resume pagination.

          
    