Skip to content

list_jobs_by_status

list_jobs_by_status(
    status: JobStatus,
    *,
    config_overrides: Optional[ElasticTranscoderClientConfig] = None,
    ascending: Optional[Ascending] = None,
    page_token: Optional[Id] = None,
) -> ListJobsByStatusResponse

The ListJobsByStatus operation gets a list of jobs that have a specified status. The response body contains one element for each job that satisfies the search criteria.

Parameters:

  • status (JobStatus) –

    To get information about all of the jobs associated with the current AWS account that have a given status, specify the following status: Submitted, Progressing, Complete, Canceled, or Error.

  • ascending (Optional[Ascending], default: None ) –

    To list jobs in chronological order by the date and time that they were submitted, enter true. To list jobs in reverse chronological order, enter false.

  • page_token (Optional[Id], default: None ) –

    When Elastic Transcoder returns more than one page of results, use pageToken in subsequent GET requests to get each successive page of results.

Raises:

  • AccessDeniedException –

    General authentication failure. The request was not signed correctly.

  • InternalServiceException –

    Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.

  • ResourceNotFoundException –

    The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.

  • ValidationException –

    One or more required parameter values were not provided in the request.

  • UnknownServiceError –

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

Source code in docs_src/capo_elastic_transcoder/_services/elastic_transcoder.py
def list_jobs_by_status(
    self,
    status: "capo_elastic_transcoder.types.job_status.JobStatus",
    *,
    config_overrides: Optional[ElasticTranscoderClientConfig] = None,
    ascending: Optional["capo_elastic_transcoder.types.ascending.Ascending"] = None,
    page_token: Optional["capo_elastic_transcoder.types.id.Id"] = None,
) -> "capo_elastic_transcoder.types.list_jobs_by_status_response.ListJobsByStatusResponse":
    """<p>The ListJobsByStatus operation gets a list of jobs that have a specified status. The response body contains one element for each job that satisfies the search criteria.</p>

    Args:
        status: <p>To get information about all of the jobs associated with the current AWS account that have a given status, specify the following status: <code>Submitted</code>, <code>Progressing</code>, <code>Complete</code>, <code>Canceled</code>, or <code>Error</code>.</p>
        ascending: <p> To list jobs in chronological order by the date and time that they were submitted, enter <code>true</code>. To list jobs in reverse chronological order, enter <code>false</code>. </p>
        page_token: <p> When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results. </p>

    Raises:
        capo_elastic_transcoder.errors.access_denied_exception.AccessDeniedException: <p>General authentication failure. The request was not signed correctly.</p>
        capo_elastic_transcoder.errors.incompatible_version_exception.IncompatibleVersionException
        capo_elastic_transcoder.errors.internal_service_exception.InternalServiceException: <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
        capo_elastic_transcoder.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
        capo_elastic_transcoder.errors.validation_exception.ValidationException: <p>One or more required parameter values were not provided in the request.</p>
        capo_elastic_transcoder.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elastic_transcoder.types.list_jobs_by_status_request.ListJobsByStatusRequest]",
    ) -> OperationResponse[
        "capo_elastic_transcoder.types.list_jobs_by_status_response.ListJobsByStatusResponse"
    ]:
        import capo_elastic_transcoder._operations.ets_customer_service.list_jobs_by_status

        output, http_response = (
            capo_elastic_transcoder._operations.ets_customer_service.list_jobs_by_status.list_jobs_by_status(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListJobsByStatus")
    )
    input_: capo_elastic_transcoder.types.list_jobs_by_status_request.ListJobsByStatusRequest = {
        "status": status
    }
    if ascending is not None:
        input_["ascending"] = ascending
    if page_token is not None:
        input_["page_token"] = page_token

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