CodeGuruSecurity / Client / create_upload_url

create_upload_url#

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

Request Syntax

response = client.create_upload_url(
    scanName='string'
)
Parameters:

scanName (string) –

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

Return type:

dict

Returns:

Response Syntax

{
    'codeArtifactId': 'string',
    'requestHeaders': {
        'string': 'string'
    },
    's3Url': 'string'
}

Response Structure

  • (dict) –

    • codeArtifactId (string) –

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

    • requestHeaders (dict) –

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

      • (string) –

        • (string) –

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

Exceptions

  • CodeGuruSecurity.Client.exceptions.InternalServerException

  • CodeGuruSecurity.Client.exceptions.ThrottlingException

  • CodeGuruSecurity.Client.exceptions.ValidationException

  • CodeGuruSecurity.Client.exceptions.AccessDeniedException