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

********
get_scan
********



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

  

  Returns details about a scan, including whether or not a scan has completed.

  

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


  **Request Syntax**
  ::

    response = client.get_scan(
        scanName='string',
        runId='string'
    )
    
  :type scanName: string
  :param scanName: **[REQUIRED]** 

    The name of the scan you want to view details about.

    

  
  :type runId: string
  :param runId: 

    UUID that identifies the individual scan run you want to view details about. You retrieve this when you call the ``CreateScan`` operation. Defaults to the latest scan run if missing.

    

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

    
    ::

      {
          'scanName': 'string',
          'runId': 'string',
          'scanState': 'InProgress'|'Successful'|'Failed',
          'createdAt': datetime(2015, 1, 1),
          'analysisType': 'Security'|'All',
          'updatedAt': datetime(2015, 1, 1),
          'numberOfRevisions': 123,
          'scanNameArn': 'string',
          'errorMessage': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The name of the scan.

        
      

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

        UUID that identifies the individual scan run.

        
      

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

        The current state of the scan. Returns either ``InProgress``, ``Successful``, or ``Failed``.

        
      

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

        The time the scan was created.

        
      

      - **analysisType** *(string) --* 

        The type of analysis CodeGuru Security performed in the scan, either ``Security`` or ``All``. The ``Security`` type only generates findings related to security. The ``All`` type generates both security findings and quality findings.

        
      

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

        The time when the scan was last updated. Only available for ``STANDARD`` scan types.

        
      

      - **numberOfRevisions** *(integer) --* 

        The number of times a scan has been re-run on a revised resource.

        
      

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

        The ARN for the scan name.

        
      

      - **errorMessage** *(string) --* 

        Details about the error that causes a scan to fail to be retrieved.

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

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

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

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

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

  