delete_data_pipeline

DataPipelinesApi.delete_data_pipeline(id, role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Delete a data pipeline

Owner-only delete. Blocked while any execution is RUNNING or STOPPING (DP-1012, HTTP 403). Glue delete fails with HTTP 400 and DependentResources when schedules or other resources still depend on the pipeline (Message has no error-code prefix). Success Message is “Successfully deleted data pipeline {name}.” Executions and related S3 reports are removed after Glue/Bedrock teardown.

Parameters:
  • id (str) – DataPipelineId. (required)

  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Lambda returns AUTH-1001 (HTTP 403 on v2-dataPipelines, HTTP 400 on v2-downloadLogs) if missing after gateway validation. (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:

MessageResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: DELETE /data-pipelines/{id}

Success (HTTP 200)

Pipeline deleted.

Glue or AI pipeline deleted

{
  "Message": "Successfully deleted data pipeline orders_enrichment_flow."
}

Errors

Documented error codes: DP-1012, AUTH-1012, AUTH-1001, GE-1044.

HTTP 400

Dependents exist (explicit HTTP 400 from the handler) or API Gateway validation.

Schedules still depend on the pipeline

{
  "Message": "There are schedules that depend on the data pipeline, remove the dependency to delete the data pipeline",
  "DependentResources": [
    {
      "ResourceType": "Schedules",
      "Resources": [
        {
          "ResourceId": "sched-11111111-1111-1111-1111-111111111111",
          "ResourceName": "nightly_orders"
        }
      ]
    }
  ]
}

HTTP 403

Invalid input or unauthorized.

Execution is RUNNING or STOPPING

{
  "Message": "DP-1012 - Cannot delete a data pipeline with execution status - {RUNNING}."
}

Caller is not owner

{
  "Message": "AUTH-1012 - User: user1 requires at least owner access on the resource to perform this action."
}

Missing role_id

{
  "Message": "AUTH-1001 - Missing role information in event header"
}

HTTP 500

Backend failure (GenericFailureException, InconsistentMetadataException, or unexpected GE-1044).

Unhandled exception

{
  "Message": "GE-1044 - Unexpected error - An unexpected error occurred."
}