Skip to content

delete_processing_job

delete_processing_job(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    processing_job_name: Optional[ProcessingJobName] = None,
) -> None

Deletes a processing job. After Amazon SageMaker deletes a processing job, all of the metadata for the processing job is lost. You can delete only processing jobs that are in a terminal state (Stopped, Failed, or Completed). You cannot delete a job that is in the InProgress or Stopping state. After deleting the job, you can reuse its name to create another processing job.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def delete_processing_job(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    processing_job_name: Optional[
        "capo_sagemaker.types.processing_job_name.ProcessingJobName"
    ] = None,
) -> None:
    """<p>Deletes a processing job. After Amazon SageMaker deletes a processing job, all of the metadata for the processing job is lost. You can delete only processing jobs that are in a terminal state (<code>Stopped</code>, <code>Failed</code>, or <code>Completed</code>). You cannot delete a job that is in the <code>InProgress</code> or <code>Stopping</code> state. After deleting the job, you can reuse its name to create another processing job.</p>

    Args:
        processing_job_name: <p>The name of the processing job to delete.</p>

    Raises:
        capo_sagemaker.errors.resource_in_use.ResourceInUse: <p>Resource being accessed is in use.</p>
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.delete_processing_job_request.DeleteProcessingJobRequest]",
    ) -> OperationResponse[None]:
        import capo_sagemaker._operations.sage_maker.delete_processing_job

        output, http_response = (
            capo_sagemaker._operations.sage_maker.delete_processing_job.delete_processing_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteProcessingJob")
    )
    input_: capo_sagemaker.types.delete_processing_job_request.DeleteProcessingJobRequest = {}
    if processing_job_name is not None:
        input_["processing_job_name"] = processing_job_name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output