Skip to content

list_text_translation_jobs async

list_text_translation_jobs(
    *,
    config_overrides: Optional[AsyncTranslateClientConfig] = None,
    filter: Optional[TextTranslationJobFilter] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResultsInteger] = None,
) -> ListTextTranslationJobsResponse

Gets a list of the batch translation jobs that you have submitted.

Parameters:

  • filter (Optional[TextTranslationJobFilter], default: None ) –

    The parameters that specify which batch translation jobs to retrieve. Filters include job name, job status, and submission time. You can only set one filter at a time.

  • next_token (Optional[NextToken], default: None ) –

    The token to request the next page of results.

  • max_results (Optional[MaxResultsInteger], default: None ) –

    The maximum number of results to return in each page. The default value is 100.

Raises:

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • InvalidFilterException –

    The filter specified for the operation is not valid. Specify a different filter.

  • InvalidRequestException –

    The request that you made is not valid. Check your request to determine why it's not valid and then retry the 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 list_text_translation_jobs(
    self,
    *,
    config_overrides: Optional[AsyncTranslateClientConfig] = None,
    filter: Optional[
        "capo_translate.types.text_translation_job_filter.TextTranslationJobFilter"
    ] = None,
    next_token: Optional["capo_translate.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_translate.types.max_results_integer.MaxResultsInteger"
    ] = None,
) -> "capo_translate.types.list_text_translation_jobs_response.ListTextTranslationJobsResponse":
    """<p>Gets a list of the batch translation jobs that you have submitted.</p>

    Args:
        filter: <p>The parameters that specify which batch translation jobs to retrieve. Filters include job name, job status, and submission time. You can only set one filter at a time.</p>
        next_token: <p>The token to request the next page of results.</p>
        max_results: <p>The maximum number of results to return in each page. The default value is 100.</p>

    Raises:
        capo_translate.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_translate.errors.invalid_filter_exception.InvalidFilterException: <p>The filter specified for the operation is not valid. Specify a different filter.</p>
        capo_translate.errors.invalid_request_exception.InvalidRequestException: <p> The request that you made is not valid. Check your request to determine why it's not valid and then retry the 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.list_text_translation_jobs_request.ListTextTranslationJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_translate.types.list_text_translation_jobs_response.ListTextTranslationJobsResponse"
    ]:
        import capo_translate._operations.aws_shine_frontend_service_20170701.list_text_translation_jobs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTextTranslationJobs")
    )
    input_: capo_translate.types.list_text_translation_jobs_request.ListTextTranslationJobsRequest = {}
    if filter is not None:
        input_["filter"] = filter
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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