:doc:`CodeGuruSecurity <../../codeguru-security>` / Client / list_scans

**********
list_scans
**********



.. py:method:: CodeGuruSecurity.Client.list_scans(**kwargs)

  

  Returns a list of all scans in an account. Does not return ``EXPRESS`` scans.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/ListScans>`_  


  **Request Syntax**
  ::

    response = client.list_scans(
        nextToken='string',
        maxResults=123
    )
    
  :type nextToken: string
  :param nextToken: 

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the ``nextToken`` value returned from the previous request to continue listing results after the first page.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the ``nextToken`` element is returned in the response. Use ``nextToken`` in a subsequent request to retrieve additional results. If not specified, returns 100 results.

    

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

    
    ::

      {
          'summaries': [
              {
                  'scanState': 'InProgress'|'Successful'|'Failed',
                  'createdAt': datetime(2015, 1, 1),
                  'updatedAt': datetime(2015, 1, 1),
                  'scanName': 'string',
                  'runId': 'string',
                  'scanNameArn': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **summaries** *(list) --* 

        A list of ``ScanSummary`` objects with information about all scans in an account.

        
        

        - *(dict) --* 

          Information about a scan.

          
          

          - **scanState** *(string) --* 

            The state of the scan. A scan can be ``In Progress``, ``Complete``, or ``Failed``.

            
          

          - **createdAt** *(datetime) --* 

            The time when the scan was created.

            
          

          - **updatedAt** *(datetime) --* 

            The time the scan was last updated. A scan is updated when it is re-run.

            
          

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

            The name of the scan.

            
          

          - **runId** *(string) --* 

            The identifier for the scan run.

            
          

          - **scanNameArn** *(string) --* 

            The ARN for the scan name.

            
      
    
      

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

        A pagination token. You can use this in future calls to ``ListScans`` to continue listing results after the current page.

        
  
  **Exceptions**
  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.InternalServerException`

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

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

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

  