Skip to content

delete_medical_transcription_job

delete_medical_transcription_job(
    medical_transcription_job_name: TranscriptionJobName,
    *,
    config_overrides: Optional[TranscribeClientConfig] = None,
) -> None

Deletes a medical transcription job. To use this operation, specify the name of the job you want to delete using MedicalTranscriptionJobName. Job names are case sensitive.

Parameters:

  • medical_transcription_job_name (TranscriptionJobName) –

    The name of the medical transcription job you want to delete. Job names are case sensitive.

Raises:

  • BadRequestException –

    Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information.

  • InternalFailureException –

    There was an internal error. Check the error message, correct the issue, and try your request again.

  • LimitExceededException –

    You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_transcribe/_services/transcribe.py
def delete_medical_transcription_job(
    self,
    medical_transcription_job_name: "capo_transcribe.types.transcription_job_name.TranscriptionJobName",
    *,
    config_overrides: Optional[TranscribeClientConfig] = None,
) -> None:
    """<p>Deletes a medical transcription job. To use this operation, specify the name of the job you want to delete using <code>MedicalTranscriptionJobName</code>. Job names are case sensitive.</p>

    Args:
        medical_transcription_job_name: <p>The name of the medical transcription job you want to delete. Job names are case sensitive.</p>

    Raises:
        capo_transcribe.errors.bad_request_exception.BadRequestException: <p>Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as <code>IN PROGRESS</code>). See the exception message field for more information.</p>
        capo_transcribe.errors.internal_failure_exception.InternalFailureException: <p>There was an internal error. Check the error message, correct the issue, and try your request again.</p>
        capo_transcribe.errors.limit_exceeded_exception.LimitExceededException: <p>You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.</p>
        capo_transcribe.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_transcribe.types.delete_medical_transcription_job_request.DeleteMedicalTranscriptionJobRequest]",
    ) -> OperationResponse[None]:
        import capo_transcribe._operations.transcribe.delete_medical_transcription_job

        output, http_response = (
            capo_transcribe._operations.transcribe.delete_medical_transcription_job.delete_medical_transcription_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteMedicalTranscriptionJob")
    )
    input_: capo_transcribe.types.delete_medical_transcription_job_request.DeleteMedicalTranscriptionJobRequest = {
        "medical_transcription_job_name": medical_transcription_job_name
    }

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