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

*****************
create_upload_url
*****************



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

  

  Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the uploaded resource.

   

  You can upload your code resource to the URL with the request headers using any HTTP client.

  

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


  **Request Syntax**
  ::

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

    The name of the scan that will use the uploaded resource. CodeGuru Security uses the unique scan name to track revisions across multiple scans of the same resource. Use this ``scanName`` when you call ``CreateScan`` on the code resource you upload to this URL.

    

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

    
    ::

      {
          's3Url': 'string',
          'requestHeaders': {
              'string': 'string'
          },
          'codeArtifactId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **s3Url** *(string) --* 

        A pre-signed S3 URL. You can upload the code file you want to scan with the required ``requestHeaders`` using any HTTP client.

        
      

      - **requestHeaders** *(dict) --* 

        A set of key-value pairs that contain the required headers when uploading your resource.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
      

      - **codeArtifactId** *(string) --* 

        The identifier for the uploaded code resource. Pass this to ``CreateScan`` to use the uploaded resources.

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

  