bulk_update_datasets

DatasetsApi.bulk_update_datasets(content_type, role_id, batch_update_dataset_metadata_inner, operation=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Batch update dataset metadata

Triggers asynchronous bulk update of dataset metadata. The caller must be owner or editor of each dataset. Processing happens via a Step Functions state machine in batches of 50 datasets. On completion, an email notification with a PDF report is sent. Use the operation query parameter to target lifecycle policy updates or deletes instead of general metadata updates. There is no dataset count limit for general metadata updates. Lifecycle operations (update_lifecycle_policy, delete_lifecycle_policy) are limited to 100 datasets per request.

Parameters:
  • content_type (str) – (required)

  • role_id (str) – The active Amorphic role ID of the caller. (required)

  • batch_update_dataset_metadata_inner (List[BatchUpdateDatasetMetadataInner]) – (required)

  • operation (str) – Controls the type of bulk operation. When absent, performs general metadata update. “update_lifecycle_policy” creates or updates lifecycle policies on the listed datasets. “delete_lifecycle_policy” removes lifecycle policies.

  • _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:

Message

Returns:

Returns the result object.

Request and Response Examples

HTTP: PUT /datasets/batch-updatemetadata

Success (HTTP 200)

Bulk operation triggered successfully. Actual results are delivered via email with a PDF report after the state machine completes.

Default bulk metadata update

{
  "Message": "Bulk Update datasets triggered, Once completed, you will receive an email notification with more info!"
}

Lifecycle policy update triggered

{
  "Message": "Bulk Update lifecycle policy triggered, Once completed, you will receive an email notification with more info!"
}

Lifecycle policy delete triggered

{
  "Message": "Bulk lifecycle policy delete triggered, Once completed, you will receive an email notification with more info!"
}

Errors

Documented error codes: DS-1065, RTE-1001.

HTTP 400

Invalid input. Error code DS-1065 when more than 100 datasets are provided for lifecycle operations.

Too many datasets for lifecycle policy update

{
  "Message": "DS-1065 - Maximum of 100 datasets with lifecycle policies can be updated in a single bulk update request"
}

Too many datasets for lifecycle policy delete

{
  "Message": "DS-1065 - Maximum of 100 datasets with lifecycle policies can be deleted in a single bulk delete request"
}

HTTP 500

Backend failure.

Request / response example

{
  "Message": "RTE-1001 - An error occurred."
}