:doc:`ComputeOptimizerAutomation <../../compute-optimizer-automation>` / Client / list_recommended_actions

************************
list_recommended_actions
************************



.. py:method:: ComputeOptimizerAutomation.Client.list_recommended_actions(**kwargs)

  

  Lists the recommended actions based that match specified filters.

   

  .. note::

    

    Management accounts and delegated administrators can retrieve recommended actions that include associated member accounts. You can associate a member account using ``AssociateAccounts``.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-automation-2025-09-22/ListRecommendedActions>`_  


  **Request Syntax**
  ::

    response = client.list_recommended_actions(
        filters=[
            {
                'name': 'ResourceType'|'RecommendedActionType'|'ResourceId'|'LookBackPeriodInDays'|'CurrentResourceDetailsEbsVolumeType'|'ResourceTagsKey'|'ResourceTagsValue'|'AccountId'|'RestartNeeded',
                'values': [
                    'string',
                ]
            },
        ],
        maxResults=123,
        nextToken='string'
    )
    
  :type filters: list
  :param filters: 

    The filters to apply to the list of recommended actions.

    

  
    - *(dict) --* 

      A filter used to narrow down recommended action results based on specific criteria.

      

    
      - **name** *(string) --* **[REQUIRED]** 

        The name of the filter field to apply.

        

      
      - **values** *(list) --* **[REQUIRED]** 

        List of filter values to match against the specified filter name. Used to narrow down recommended actions based on specific criteria.

        

      
        - *(string) --* 

        
    
    

  :type maxResults: integer
  :param maxResults: 

    The maximum number of recommended actions to return in a single response. Valid range is 1-1000.

    

  
  :type nextToken: string
  :param nextToken: 

    A token used for pagination to retrieve the next set of results when the response is truncated.

    

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

    
    ::

      {
          'recommendedActions': [
              {
                  'recommendedActionId': 'string',
                  'resourceArn': 'string',
                  'resourceId': 'string',
                  'accountId': 'string',
                  'region': 'string',
                  'resourceType': 'EbsVolume',
                  'lookBackPeriodInDays': 123,
                  'recommendedActionType': 'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
                  'currentResourceSummary': 'string',
                  'currentResourceDetails': {
                      'ebsVolume': {
                          'configuration': {
                              'type': 'string',
                              'sizeInGib': 123,
                              'iops': 123,
                              'throughput': 123
                          }
                      }
                  },
                  'recommendedResourceSummary': 'string',
                  'recommendedResourceDetails': {
                      'ebsVolume': {
                          'configuration': {
                              'type': 'string',
                              'sizeInGib': 123,
                              'iops': 123,
                              'throughput': 123
                          }
                      }
                  },
                  'restartNeeded': True|False,
                  'estimatedMonthlySavings': {
                      'currency': 'string',
                      'beforeDiscountSavings': 123.0,
                      'afterDiscountSavings': 123.0,
                      'savingsEstimationMode': 'BeforeDiscount'|'AfterDiscount'
                  },
                  'resourceTags': [
                      {
                          'key': 'string',
                          'value': 'string'
                      },
                  ]
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **recommendedActions** *(list) --* 

        The list of recommended actions that match the specified criteria.

        
        

        - *(dict) --* 

          Contains information about a recommended action that can be applied to optimize an Amazon Web Services resource.

          
          

          - **recommendedActionId** *(string) --* 

            The unique identifier of the recommended action.

            
          

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

            The Amazon Resource Name (ARN) of the resource that the recommendation applies to.

            
          

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

            The ID of the resource that the recommendation applies to.

            
          

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

            The Amazon Web Services account ID that owns the resource.

            
          

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

            The Amazon Web Services Region where the resource is located.

            
          

          - **resourceType** *(string) --* 

            The type of resource being evaluated.

            
          

          - **lookBackPeriodInDays** *(integer) --* 

            The number of days of historical data used to generate the recommendation.

            
          

          - **recommendedActionType** *(string) --* 

            The type of action being recommended.

            
          

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

            A summary of the resource's current configuration.

            
          

          - **currentResourceDetails** *(dict) --* 

            Detailed configuration information for a specific Amazon Web Services resource, with type-specific details.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``ebsVolume``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **ebsVolume** *(dict) --* 

              Detailed configuration information specific to EBS volumes, including volume type, size, IOPS, and throughput settings.

              
              

              - **configuration** *(dict) --* 

                The configuration details of the EBS volume, including type, size, IOPS, and throughput.

                
                

                - **type** *(string) --* 

                  The EBS volume type, such as gp2, gp3, io1, io2, st1, or sc1.

                  
                

                - **sizeInGib** *(integer) --* 

                  The size of the EBS volume in gibibytes (GiB).

                  
                

                - **iops** *(integer) --* 

                  The number of I/O operations per second (IOPS) provisioned for the volume.

                  
                

                - **throughput** *(integer) --* 

                  The throughput in MiB/s provisioned for the volume (applicable to gp3, io1, and io2bx volumes).

                  
            
          
        
          

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

            A summary of the resource's recommended configuration.

            
          

          - **recommendedResourceDetails** *(dict) --* 

            Detailed configuration information for a specific Amazon Web Services resource, with type-specific details.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``ebsVolume``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **ebsVolume** *(dict) --* 

              Detailed configuration information specific to EBS volumes, including volume type, size, IOPS, and throughput settings.

              
              

              - **configuration** *(dict) --* 

                The configuration details of the EBS volume, including type, size, IOPS, and throughput.

                
                

                - **type** *(string) --* 

                  The EBS volume type, such as gp2, gp3, io1, io2, st1, or sc1.

                  
                

                - **sizeInGib** *(integer) --* 

                  The size of the EBS volume in gibibytes (GiB).

                  
                

                - **iops** *(integer) --* 

                  The number of I/O operations per second (IOPS) provisioned for the volume.

                  
                

                - **throughput** *(integer) --* 

                  The throughput in MiB/s provisioned for the volume (applicable to gp3, io1, and io2bx volumes).

                  
            
          
        
          

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

            Indicates whether implementing the recommended action requires a resource restart.

            
          

          - **estimatedMonthlySavings** *(dict) --* 

            Contains information about estimated monthly cost savings.

            
            

            - **currency** *(string) --* 

              The currency of the estimated savings.

              
            

            - **beforeDiscountSavings** *(float) --* 

              The estimated monthly savings before applying any discounts.

              
            

            - **afterDiscountSavings** *(float) --* 

              The estimated monthly savings after applying any discounts.

              
            

            - **savingsEstimationMode** *(string) --* 

              The mode used to calculate savings, either BeforeDiscount or AfterDiscount.

              
        
          

          - **resourceTags** *(list) --* 

            The tags associated with the resource.

            
            

            - *(dict) --* 

              A key-value pair used to categorize and organize Amazon Web Services resources and automation rules.

              
              

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

                The tag key, which can be up to 128 characters long.

                
              

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

                The tag value, which can be up to 256 characters long.

                
          
        
      
    
      

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

        A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.

        
  
  **Exceptions**
  
  *   :py:class:`ComputeOptimizerAutomation.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`ComputeOptimizerAutomation.Client.exceptions.ForbiddenException`

  
  *   :py:class:`ComputeOptimizerAutomation.Client.exceptions.OptInRequiredException`

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

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

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

  
  *   :py:class:`ComputeOptimizerAutomation.Client.exceptions.ServiceUnavailableException`

  