:doc:`Inspector2 <../../inspector2>` / Client / list_cis_scan_results_aggregated_by_target_resource

***************************************************
list_cis_scan_results_aggregated_by_target_resource
***************************************************



.. py:method:: Inspector2.Client.list_cis_scan_results_aggregated_by_target_resource(**kwargs)

  

  Lists scan results aggregated by a target resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/inspector2-2020-06-08/ListCisScanResultsAggregatedByTargetResource>`_  


  **Request Syntax**
  ::

    response = client.list_cis_scan_results_aggregated_by_target_resource(
        scanArn='string',
        filterCriteria={
            'accountIdFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'statusFilters': [
                {
                    'comparison': 'EQUALS',
                    'value': 'PASSED'|'FAILED'|'SKIPPED'
                },
            ],
            'checkIdFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'targetResourceIdFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'targetResourceTagFilters': [
                {
                    'comparison': 'EQUALS',
                    'key': 'string',
                    'value': 'string'
                },
            ],
            'platformFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'targetStatusFilters': [
                {
                    'comparison': 'EQUALS',
                    'value': 'TIMED_OUT'|'CANCELLED'|'COMPLETED'
                },
            ],
            'targetStatusReasonFilters': [
                {
                    'comparison': 'EQUALS',
                    'value': 'SCAN_IN_PROGRESS'|'UNSUPPORTED_OS'|'SSM_UNMANAGED'
                },
            ],
            'failedChecksFilters': [
                {
                    'upperInclusive': 123,
                    'lowerInclusive': 123
                },
            ]
        },
        sortBy='RESOURCE_ID'|'FAILED_COUNTS'|'ACCOUNT_ID'|'PLATFORM'|'TARGET_STATUS'|'TARGET_STATUS_REASON',
        sortOrder='ASC'|'DESC',
        nextToken='string',
        maxResults=123
    )
    
  :type scanArn: string
  :param scanArn: **[REQUIRED]** 

    The scan ARN.

    

  
  :type filterCriteria: dict
  :param filterCriteria: 

    The filter criteria.

    

  
    - **accountIdFilters** *(list) --* 

      The criteria's account ID filters.

      

    
      - *(dict) --* 

        The CIS string filter.

        

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

          The comparison value of the CIS string filter.

          

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

          The value of the CIS string filter.

          

        
      
  
    - **statusFilters** *(list) --* 

      The criteria's status filter.

      

    
      - *(dict) --* 

        The CIS result status filter.

        

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

          The comparison value of the CIS result status filter.

          

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

          The value of the CIS result status filter.

          

        
      
  
    - **checkIdFilters** *(list) --* 

      The criteria's check ID filters.

      

    
      - *(dict) --* 

        The CIS string filter.

        

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

          The comparison value of the CIS string filter.

          

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

          The value of the CIS string filter.

          

        
      
  
    - **targetResourceIdFilters** *(list) --* 

      The criteria's target resource ID filters.

      

    
      - *(dict) --* 

        The CIS string filter.

        

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

          The comparison value of the CIS string filter.

          

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

          The value of the CIS string filter.

          

        
      
  
    - **targetResourceTagFilters** *(list) --* 

      The criteria's target resource tag filters.

      

    
      - *(dict) --* 

        The tag filter.

        

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

          The tag filter comparison value.

          

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

          The tag filter key.

          

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

          The tag filter value.

          

        
      
  
    - **platformFilters** *(list) --* 

      The criteria's platform filters.

      

    
      - *(dict) --* 

        The CIS string filter.

        

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

          The comparison value of the CIS string filter.

          

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

          The value of the CIS string filter.

          

        
      
  
    - **targetStatusFilters** *(list) --* 

      The criteria's target status filters.

      

    
      - *(dict) --* 

        The CIS target status filter.

        

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

          The comparison value of the CIS target status filter.

          

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

          The value of the CIS target status filter.

          

        
      
  
    - **targetStatusReasonFilters** *(list) --* 

      The criteria's target status reason filters.

      

    
      - *(dict) --* 

        The CIS target status reason filter.

        

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

          The comparison value of the CIS target status reason filter.

          

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

          The value of the CIS target status reason filter.

          

        
      
  
    - **failedChecksFilters** *(list) --* 

      The criteria's failed checks filters.

      

    
      - *(dict) --* 

        The CIS number filter.

        

      
        - **upperInclusive** *(integer) --* 

          The CIS number filter's upper inclusive.

          

        
        - **lowerInclusive** *(integer) --* 

          The CIS number filter's lower inclusive.

          

        
      
  
  
  :type sortBy: string
  :param sortBy: 

    The sort by order.

    

  
  :type sortOrder: string
  :param sortOrder: 

    The sort order.

    

  
  :type nextToken: string
  :param nextToken: 

    The pagination token from a previous request that's used to retrieve the next page of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of scan results aggregated by a target resource to be returned in a single page of results.

    

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

    
    ::

      {
          'targetResourceAggregations': [
              {
                  'scanArn': 'string',
                  'targetResourceId': 'string',
                  'accountId': 'string',
                  'targetResourceTags': {
                      'string': [
                          'string',
                      ]
                  },
                  'statusCounts': {
                      'failed': 123,
                      'skipped': 123,
                      'passed': 123
                  },
                  'platform': 'string',
                  'targetStatus': 'TIMED_OUT'|'CANCELLED'|'COMPLETED',
                  'targetStatusReason': 'SCAN_IN_PROGRESS'|'UNSUPPORTED_OS'|'SSM_UNMANAGED'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **targetResourceAggregations** *(list) --* 

        The resource aggregations.

        
        

        - *(dict) --* 

          The CIS target resource aggregation.

          
          

          - **scanArn** *(string) --* 

            The scan ARN for the CIS target resource.

            
          

          - **targetResourceId** *(string) --* 

            The ID of the target resource.

            
          

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

            The account ID for the CIS target resource.

            
          

          - **targetResourceTags** *(dict) --* 

            The tag for the target resource.

            
            

            - *(string) --* 
              

              - *(list) --* 
                

                - *(string) --* 
            
        
      
          

          - **statusCounts** *(dict) --* 

            The target resource status counts.

            
            

            - **failed** *(integer) --* 

              The number of checks that failed.

              
            

            - **skipped** *(integer) --* 

              The number of checks that were skipped.

              
            

            - **passed** *(integer) --* 

              The number of checks that passed.

              
        
          

          - **platform** *(string) --* 

            The platform for the CIS target resource.

            
          

          - **targetStatus** *(string) --* 

            The status of the target resource.

            
          

          - **targetStatusReason** *(string) --* 

            The reason for the target resource.

            
      
    
      

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

        The pagination token from a previous request that's used to retrieve the next page of results.

        
  
  **Exceptions**
  
  *   :py:class:`Inspector2.Client.exceptions.AccessDeniedException`

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

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

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

  