get_job_library_download_url

EtlJobsApi.get_job_library_download_url(filepath, id, role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Get a presigned URL to download a job library

Returns a short-lived S3 GET URL for a library file already attached to the job. The filepath query is appended to s3://{etlBucket}/{jobId}.

Parameters:
  • filepath (str) – Object key of the library under the job prefix, including a leading slash (for example /libs/python/sales_helpers.zip). Combined as s3://{etlBucket}/{jobId}{filepath}. Missing this parameter returns IPV-1052. (required)

  • id (str) – UUID of the ETL job that owns the library file. (required)

  • role_id (str) – Amorphic role ID sent for authorization. Missing this header returns AUTH-1001. (required)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

JobFilePresignedGetResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /jobs/{id}/libs/download

Success (HTTP 200)

Presigned download URL in the url field.

Request / response example

{
  "url": "https://s3.amazonaws.com/example-etl-bucket/3fa85f64-5717-4562-b3fc-2c963f66afa6/libs/python/sales_helpers.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256"
}

Errors

Documented error codes: IPV-1052, GE-1008.

HTTP 400

Missing filepath (IPV-1052), missing job, or insufficient access.

Request / response example

{
  "Message": "IPV-1052 - Missing mandatory parameter(s) filepath in queryStringParameters/pathParameters"
}

HTTP 500

Uncaught backend failure. Typical Message is “GE-1008 - Could not complete the request. Please try again.”

Request / response example

{
  "Message": "GE-1008 - Could not complete the request. Please try again."
}