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

************************
start_code_security_scan
************************



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

  

  Initiates a code security scan on a specified repository.

  

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


  **Request Syntax**
  ::

    response = client.start_code_security_scan(
        clientToken='string',
        resource={
            'projectId': 'string'
        }
    )
    
  :type clientToken: string
  :param clientToken: 

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    This field is autopopulated if not provided.

  
  :type resource: dict
  :param resource: **[REQUIRED]** 

    The resource identifier for the code repository to scan.

    .. 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.

      

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

    
    ::

      {
          'scanId': 'string',
          'status': 'IN_PROGRESS'|'SUCCESSFUL'|'FAILED'|'SKIPPED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The unique identifier of the initiated scan.

        
      

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

        The current status of the initiated scan.

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

  