Translate / Client / stop_text_translation_job

stop_text_translation_job#

Translate.Client.stop_text_translation_job(**kwargs)#

Stops an asynchronous batch translation job that is in progress.

If the job’s state is IN_PROGRESS, the job will be marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state. Otherwise, the job is put into the STOPPED state.

Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job’s JobId.

See also: AWS API Documentation

Request Syntax

response = client.stop_text_translation_job(
    JobId='string'
)
Parameters:

JobId (string) –

[REQUIRED]

The job ID of the job to be stopped.

Return type:

dict

Returns:

Response Syntax

{
    'JobId': 'string',
    'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'COMPLETED_WITH_ERROR'|'FAILED'|'STOP_REQUESTED'|'STOPPED'
}

Response Structure

  • (dict) –

    • JobId (string) –

      The job ID of the stopped batch translation job.

    • JobStatus (string) –

      The status of the designated job. Upon successful completion, the job’s status will be STOPPED.

Exceptions

  • Translate.Client.exceptions.ResourceNotFoundException

  • Translate.Client.exceptions.TooManyRequestsException

  • Translate.Client.exceptions.InternalServerException