Skip to content

describe_text_translation_job async

describe_text_translation_job(
    job_id: JobId, *, config_overrides: Optional[AsyncTranslateClientConfig] = None
) -> DescribeTextTranslationJobResponse

Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.

Parameters:

  • job_id (JobId) –

    The identifier that Amazon Translate generated for the job. The StartTextTranslationJob operation returns this identifier in its response.

Raises:

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • ResourceNotFoundException –

    The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request.

  • TooManyRequestsException –

    You have made too many requests within a short period of time. Wait for a short time and then try your request again.

  • UnknownServiceError –

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

Source code in docs_src/capo_translate/_services/async_translate.py
async def describe_text_translation_job(
    self,
    job_id: "capo_translate.types.job_id.JobId",
    *,
    config_overrides: Optional[AsyncTranslateClientConfig] = None,
) -> "capo_translate.types.describe_text_translation_job_response.DescribeTextTranslationJobResponse":
    """<p>Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.</p>

    Args:
        job_id: <p>The identifier that Amazon Translate generated for the job. The <a>StartTextTranslationJob</a> operation returns this identifier in its response.</p>

    Raises:
        capo_translate.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_translate.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request.</p>
        capo_translate.errors.too_many_requests_exception.TooManyRequestsException: <p> You have made too many requests within a short period of time. Wait for a short time and then try your request again.</p>
        capo_translate.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_translate.types.describe_text_translation_job_request.DescribeTextTranslationJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_translate.types.describe_text_translation_job_response.DescribeTextTranslationJobResponse"
    ]:
        import capo_translate._operations.aws_shine_frontend_service_20170701.describe_text_translation_job

        (
            output,
            http_response,
        ) = await capo_translate._operations.aws_shine_frontend_service_20170701.describe_text_translation_job.async_describe_text_translation_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTextTranslationJob")
    )
    input_: capo_translate.types.describe_text_translation_job_request.DescribeTextTranslationJobRequest = {
        "job_id": job_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output