update_shared_job_library_details¶
- EtlJobsApi.update_shared_job_library_details(id, role_id, update_shared_job_lib_info, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update shared job library details
Owner or editor only. Omitted body keys keep stored values. LibraryName cannot change. Extra keys are rejected. Cannot run while LibraryStatus is update-in-progress. Package changes continue asynchronously. Returns Message when metadata update is accepted.
- Parameters:
id (str) – Shared library identifier. (required)
role_id (str) – Amorphic role ID of the requesting user. Must be a role the authenticated user belongs to. (required)
update_shared_job_lib_info (UpdateSharedJobLibInfo) – Partial update. Allowed keys are LibraryName, LibraryDescription, Keywords, Packages. (required)
content_type (str) – Request body media type.
_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:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /jobs/libs/{id}
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
header |
|
|
path |
|
|
header |
|
Request¶
Partial update. Allowed keys are LibraryName, LibraryDescription, Keywords, Packages.
Update description only
{
"LibraryDescription": "Shared Spark helpers for ETL jobs"
}
Update keywords
{
"Keywords": [
"spark",
"etl",
"utils"
]
}
Register uploaded packages
{
"Packages": [
"s3://example-etl-bucket/common-libs/123e4567-e89b-12d3-a456-426614174000/libs/python/helpers.zip",
"s3://example-etl-bucket/common-libs/123e4567-e89b-12d3-a456-426614174000/libs/python/utils.whl"
]
}
Remove all packages (empty list)
{
"Packages": []
}
Update description, keywords, and packages
{
"LibraryDescription": "Shared Spark helpers for ETL jobs",
"Keywords": [
"spark",
"etl"
],
"Packages": [
"s3://example-etl-bucket/common-libs/123e4567-e89b-12d3-a456-426614174000/libs/python/helpers.zip"
]
}
Success (HTTP 200)¶
Update accepted. Package work may still be running.
Request / response example
{
"Message": "Shared library is being updated in the background!"
}
Errors¶
Documented error codes: IPV-1008, AUTH-1015, AUTH-1010, AUTH-1001, AUTH-1011, GE-1034, GE-1020.
HTTP 400
Input validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: IPV-1008 (invalid body or LibraryName change), AUTH-1015 (not editor), AUTH-1010 (not owner), AUTH-1001 (missing role_id), AUTH-1011 (caller not authorized).
Missing role_id header
{
"Message": "AUTH-1001 - Missing role information in event header"
}
Caller not authorized
{
"Message": "AUTH-1011 - User does not have sufficient permission to perform this action"
}
Editor access required
{
"Message": "AUTH-1015 - User does not have sufficient permission to perform this action"
}
HTTP 500
Backend failure. Body is {“Message”: “<CODE> - <text>”}. Codes: GE-1034 (library update already in progress), GE-1020 (metadata update failed).
Unexpected backend failure
{
"Message": "GE-1034 - Unable to process the request"
}