:doc:`ComputeOptimizerAutomation <../../compute-optimizer-automation>` / Paginator / ListAutomationRulePreview

*************************
ListAutomationRulePreview
*************************



.. py:class:: ComputeOptimizerAutomation.Paginator.ListAutomationRulePreview

  ::

    
    paginator = client.get_paginator('list_automation_rule_preview')

  
  

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

    Creates an iterator that will paginate through responses from :py:meth:`ComputeOptimizerAutomation.Client.list_automation_rule_preview`.

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


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          ruleType='OrganizationRule'|'AccountRule',
          organizationScope={
              'accountIds': [
                  'string',
              ]
          },
          recommendedActionTypes=[
              'SnapshotAndDeleteUnattachedEbsVolume'|'UpgradeEbsVolumeType',
          ],
          criteria={
              'region': [
                  {
                      'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals',
                      'values': [
                          'string',
                      ]
                  },
              ],
              'resourceArn': [
                  {
                      'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals',
                      'values': [
                          'string',
                      ]
                  },
              ],
              'ebsVolumeType': [
                  {
                      'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals',
                      'values': [
                          'string',
                      ]
                  },
              ],
              'ebsVolumeSizeInGib': [
                  {
                      'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals',
                      'values': [
                          123,
                      ]
                  },
              ],
              'estimatedMonthlySavings': [
                  {
                      'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals',
                      'values': [
                          123.0,
                      ]
                  },
              ],
              'resourceTag': [
                  {
                      'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals',
                      'key': 'string',
                      'values': [
                          'string',
                      ]
                  },
              ],
              'lookBackPeriodInDays': [
                  {
                      'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals',
                      'values': [
                          123,
                      ]
                  },
              ],
              'restartNeeded': [
                  {
                      'comparison': 'StringEquals'|'StringNotEquals'|'StringEqualsIgnoreCase'|'StringNotEqualsIgnoreCase'|'StringLike'|'StringNotLike'|'NumericEquals'|'NumericNotEquals'|'NumericLessThan'|'NumericLessThanEquals'|'NumericGreaterThan'|'NumericGreaterThanEquals',
                      'values': [
                          'string',
                      ]
                  },
              ]
          },
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type ruleType: string
    :param ruleType: **[REQUIRED]** 

      The type of rule.

       

      .. note::

        

        Only the management account or a delegated administrator can set the ruleType to be OrganizationRule.

        

      

    
    :type organizationScope: dict
    :param organizationScope: 

      The organizational scope for the rule preview.

      

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

        List of Amazon Web Services account IDs to include in the organization scope.

        

      
        - *(string) --* 

        
    
    
    :type recommendedActionTypes: list
    :param recommendedActionTypes: **[REQUIRED]** 

      The types of recommended actions to include in the preview.

      

    
      - *(string) --* 

        Recommended action type enumeration

        

      
  
    :type criteria: dict
    :param criteria: 

      A set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time.

      

    
      - **region** *(list) --* 

        Filter criteria for Amazon Web Services regions where resources must be located.

        

      
        - *(dict) --* 

          Criteria condition for filtering based on string values, including comparison operators and target values.

          

        
          - **comparison** *(string) --* 

            The comparison operator used to evaluate the string criteria, such as equals, not equals, or contains.

            

          
          - **values** *(list) --* 

            List of string values to compare against when applying the criteria condition.

            

          
            - *(string) --* 

            
        
        
    
      - **resourceArn** *(list) --* 

        Filter criteria for specific resource ARNs to include or exclude.

        

      
        - *(dict) --* 

          Criteria condition for filtering based on string values, including comparison operators and target values.

          

        
          - **comparison** *(string) --* 

            The comparison operator used to evaluate the string criteria, such as equals, not equals, or contains.

            

          
          - **values** *(list) --* 

            List of string values to compare against when applying the criteria condition.

            

          
            - *(string) --* 

            
        
        
    
      - **ebsVolumeType** *(list) --* 

        Filter criteria for EBS volume types, such as gp2, gp3, io1, io2, st1, or sc1.

        

      
        - *(dict) --* 

          Criteria condition for filtering based on string values, including comparison operators and target values.

          

        
          - **comparison** *(string) --* 

            The comparison operator used to evaluate the string criteria, such as equals, not equals, or contains.

            

          
          - **values** *(list) --* 

            List of string values to compare against when applying the criteria condition.

            

          
            - *(string) --* 

            
        
        
    
      - **ebsVolumeSizeInGib** *(list) --* 

        Filter criteria for EBS volume sizes in gibibytes (GiB).

        

      
        - *(dict) --* 

          Defines a condition for filtering based on integer values with comparison operators.

          

        
          - **comparison** *(string) --* 

            The comparison operator to use, such as equals, greater than, less than, etc.

            

          
          - **values** *(list) --* 

            The list of integer values to compare against using the specified comparison operator.

            

          
            - *(integer) --* 

            
        
        
    
      - **estimatedMonthlySavings** *(list) --* 

        Filter criteria for estimated monthly cost savings from the recommended action.

        

      
        - *(dict) --* 

          Defines a condition for filtering based on double/floating-point numeric values with comparison operators.

          

        
          - **comparison** *(string) --* 

            The comparison operator to use, such as equals, greater than, less than, etc.

            

          
          - **values** *(list) --* 

            The list of double values to compare against using the specified comparison operator.

            

          
            - *(float) --* 

            
        
        
    
      - **resourceTag** *(list) --* 

        Filter criteria for resource tags, allowing filtering by tag key and value combinations.

        

      
        - *(dict) --* 

          Criteria condition for filtering resources based on their tags, including comparison operators and values.

          

        
          - **comparison** *(string) --* 

            The comparison operator used to evaluate the tag criteria, such as equals, not equals, or contains.

            

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

            The tag key to use for comparison when filtering resources.

            

          
          - **values** *(list) --* 

            List of tag values to compare against when filtering resources.

            

          
            - *(string) --* 

            
        
        
    
      - **lookBackPeriodInDays** *(list) --* 

        Filter criteria for the lookback period in days used to analyze resource utilization.

        

      
        - *(dict) --* 

          Defines a condition for filtering based on integer values with comparison operators.

          

        
          - **comparison** *(string) --* 

            The comparison operator to use, such as equals, greater than, less than, etc.

            

          
          - **values** *(list) --* 

            The list of integer values to compare against using the specified comparison operator.

            

          
            - *(integer) --* 

            
        
        
    
      - **restartNeeded** *(list) --* 

        Filter criteria indicating whether the recommended action requires a resource restart.

        

      
        - *(dict) --* 

          Criteria condition for filtering based on string values, including comparison operators and target values.

          

        
          - **comparison** *(string) --* 

            The comparison operator used to evaluate the string criteria, such as equals, not equals, or contains.

            

          
          - **values** *(list) --* 

            List of string values to compare against when applying the criteria condition.

            

          
            - *(string) --* 

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

      
      ::

        {
            'previewResults': [
                {
                    '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) --* 
        

        - **previewResults** *(list) --* 

          The list of actions that would be taken based on the specified criteria.

          
          

          - *(dict) --* 

            Contains the results of previewing an automation rule against available recommendations.

            
            

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

              The ID of the recommended action being previewed.

              
            

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

              The Amazon Resource Name (ARN) of the resource affected by the recommended action.

              
            

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

              The ID of the resource affected by the recommended action.

              
            

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

              The Amazon Web Services account ID associated with 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 analyze the resource.

              
            

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

              The type of recommended action being previewed.

              
            

            - **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 to resume pagination.

          
    