Skip to content

delete_job

delete_job(
    job_name: NameString, *, config_overrides: Optional[GlueClientConfig] = None
) -> DeleteJobResponse

Deletes a specified job definition. If the job definition is not found, no exception is thrown.

Parameters:

  • job_name (NameString) –

    The name of the job definition to delete.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def delete_job(
    self,
    job_name: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
) -> "capo_glue.types.delete_job_response.DeleteJobResponse":
    """<p>Deletes a specified job definition. If the job definition is not found, no exception is thrown.</p>

    Args:
        job_name: <p>The name of the job definition to delete.</p>

    Raises:
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.delete_job_request.DeleteJobRequest]",
    ) -> OperationResponse["capo_glue.types.delete_job_response.DeleteJobResponse"]:
        import capo_glue._operations.aws_glue.delete_job

        output, http_response = (
            capo_glue._operations.aws_glue.delete_job.delete_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteJob")
    )
    input_: capo_glue.types.delete_job_request.DeleteJobRequest = {
        "job_name": job_name
    }

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