The ListJobsByPipeline operation gets a list of the jobs currently in a pipeline.
Elastic Transcoder returns all of the jobs currently in the specified pipeline. The response body contains one element for each job that satisfies the search criteria.
Parameters:
-
pipeline_id
(Id)
–
The ID of the pipeline for which you want to get job information.
-
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/async_elastic_transcoder.py
| async def list_jobs_by_pipeline(
self,
pipeline_id: "capo_elastic_transcoder.types.id.Id",
*,
config_overrides: Optional[AsyncElasticTranscoderClientConfig] = 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_pipeline_response.ListJobsByPipelineResponse":
"""<p>The ListJobsByPipeline operation gets a list of the jobs currently in a pipeline.</p> <p>Elastic Transcoder returns all of the jobs currently in the specified pipeline. The response body contains one element for each job that satisfies the search criteria.</p>
Args:
pipeline_id: <p>The ID of the pipeline for which you want to get job information.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_transcoder.types.list_jobs_by_pipeline_request.ListJobsByPipelineRequest]",
) -> AsyncOperationResponse[
"capo_elastic_transcoder.types.list_jobs_by_pipeline_response.ListJobsByPipelineResponse"
]:
import capo_elastic_transcoder._operations.ets_customer_service.list_jobs_by_pipeline
(
output,
http_response,
) = await capo_elastic_transcoder._operations.ets_customer_service.list_jobs_by_pipeline.async_list_jobs_by_pipeline(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListJobsByPipeline")
)
input_: capo_elastic_transcoder.types.list_jobs_by_pipeline_request.ListJobsByPipelineRequest = {
"pipeline_id": pipeline_id
}
if ascending is not None:
input_["ascending"] = ascending
if page_token is not None:
input_["page_token"] = page_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|