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

**************
list_cis_scans
**************



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

  

  Returns a CIS scan list.

  

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


  **Request Syntax**
  ::

    response = client.list_cis_scans(
        filterCriteria={
            'scanNameFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'targetResourceTagFilters': [
                {
                    'comparison': 'EQUALS',
                    'key': 'string',
                    'value': 'string'
                },
            ],
            'targetResourceIdFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'scanStatusFilters': [
                {
                    'comparison': 'EQUALS',
                    'value': 'FAILED'|'COMPLETED'|'CANCELLED'|'IN_PROGRESS'
                },
            ],
            'scanAtFilters': [
                {
                    'earliestScanStartTime': datetime(2015, 1, 1),
                    'latestScanStartTime': datetime(2015, 1, 1)
                },
            ],
            'scanConfigurationArnFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'scanArnFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'scheduledByFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ],
            'failedChecksFilters': [
                {
                    'upperInclusive': 123,
                    'lowerInclusive': 123
                },
            ],
            'targetAccountIdFilters': [
                {
                    'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                    'value': 'string'
                },
            ]
        },
        detailLevel='ORGANIZATION'|'MEMBER',
        sortBy='STATUS'|'SCHEDULED_BY'|'SCAN_START_DATE'|'FAILED_CHECKS',
        sortOrder='ASC'|'DESC',
        nextToken='string',
        maxResults=123
    )
    
  :type filterCriteria: dict
  :param filterCriteria: 

    The CIS scan filter criteria.

    

  
    - **scanNameFilters** *(list) --* 

      The list of scan name 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 list of 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.

          

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

      The list of 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.

          

        
      
  
    - **scanStatusFilters** *(list) --* 

      The list of scan status filters.

      

    
      - *(dict) --* 

        The CIS scan status filter.

        

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

          The filter comparison value.

          

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

          The filter value.

          

        
      
  
    - **scanAtFilters** *(list) --* 

      The list of scan at filters.

      

    
      - *(dict) --* 

        The CIS date filter.

        

      
        - **earliestScanStartTime** *(datetime) --* 

          The CIS date filter's earliest scan start time.

          

        
        - **latestScanStartTime** *(datetime) --* 

          The CIS date filter's latest scan start time.

          

        
      
  
    - **scanConfigurationArnFilters** *(list) --* 

      The list of scan configuration ARN 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.

          

        
      
  
    - **scanArnFilters** *(list) --* 

      The list of scan ARN 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.

          

        
      
  
    - **scheduledByFilters** *(list) --* 

      The list of scheduled by 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.

          

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

      The list of 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.

          

        
      
  
    - **targetAccountIdFilters** *(list) --* 

      The list of target 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.

          

        
      
  
  
  :type detailLevel: string
  :param detailLevel: 

    The detail applied to the CIS scan.

    

  
  :type sortBy: string
  :param sortBy: 

    The CIS scans sort by order.

    

  
  :type sortOrder: string
  :param sortOrder: 

    The CIS scans 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 results to be returned.

    

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

    
    ::

      {
          'scans': [
              {
                  'scanArn': 'string',
                  'scanConfigurationArn': 'string',
                  'status': 'FAILED'|'COMPLETED'|'CANCELLED'|'IN_PROGRESS',
                  'scanName': 'string',
                  'scanDate': datetime(2015, 1, 1),
                  'failedChecks': 123,
                  'totalChecks': 123,
                  'targets': {
                      'accountIds': [
                          'string',
                      ],
                      'targetResourceTags': {
                          'string': [
                              'string',
                          ]
                      }
                  },
                  'scheduledBy': 'string',
                  'securityLevel': 'LEVEL_1'|'LEVEL_2'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **scans** *(list) --* 

        The CIS scans.

        
        

        - *(dict) --* 

          The CIS scan.

          
          

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

            The CIS scan's ARN.

            
          

          - **scanConfigurationArn** *(string) --* 

            The CIS scan's configuration ARN.

            
          

          - **status** *(string) --* 

            The CIS scan's status.

            
          

          - **scanName** *(string) --* 

            The the name of the scan configuration that's associated with this scan.

            
          

          - **scanDate** *(datetime) --* 

            The CIS scan's date.

            
          

          - **failedChecks** *(integer) --* 

            The CIS scan's failed checks.

            
          

          - **totalChecks** *(integer) --* 

            The CIS scan's total checks.

            
          

          - **targets** *(dict) --* 

            The CIS scan's targets.

            
            

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

              The CIS target account ids.

              
              

              - *(string) --* 
          
            

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

              The CIS target resource tags.

              
              

              - *(string) --* 
                

                - *(list) --* 
                  

                  - *(string) --* 
              
          
        
        
          

          - **scheduledBy** *(string) --* 

            The account or organization that schedules the CIS scan.

            
          

          - **securityLevel** *(string) --* 

            The security level for the CIS scan. Security level refers to the Benchmark levels that CIS assigns to a profile.

            
      
    
      

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

  