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

**********************
get_code_security_scan
**********************



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

  

  Retrieves information about a specific code security scan.

  

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


  **Request Syntax**
  ::

    response = client.get_code_security_scan(
        resource={
            'projectId': 'string'
        },
        scanId='string'
    )
    
  :type resource: dict
  :param resource: **[REQUIRED]** 

    The resource identifier for the code repository that was scanned.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``projectId``. 

  
    - **projectId** *(string) --* 

      The unique identifier of the project in the code repository.

      

    
  
  :type scanId: string
  :param scanId: **[REQUIRED]** 

    The unique identifier of the scan to retrieve.

    

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

    
    ::

      {
          'scanId': 'string',
          'resource': {
              'projectId': 'string'
          },
          'accountId': 'string',
          'status': 'IN_PROGRESS'|'SUCCESSFUL'|'FAILED'|'SKIPPED',
          'statusReason': 'string',
          'createdAt': datetime(2015, 1, 1),
          'updatedAt': datetime(2015, 1, 1),
          'lastCommitId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **scanId** *(string) --* 

        The unique identifier of the scan.

        
      

      - **resource** *(dict) --* 

        The resource identifier for the code repository that was scanned.

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``projectId``.     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'}


      
        

        - **projectId** *(string) --* 

          The unique identifier of the project in the code repository.

          
    
      

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

        The Amazon Web Services account ID associated with the scan.

        
      

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

        The current status of the scan.

        
      

      - **statusReason** *(string) --* 

        The reason for the current status of the scan.

        
      

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

        The timestamp when the scan was created.

        
      

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

        The timestamp when the scan was last updated.

        
      

      - **lastCommitId** *(string) --* 

        The identifier of the last commit that was scanned. This is only returned if the scan was successful or skipped.

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

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

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

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

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

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

  