The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of jobs.
Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for the jobs that you want to cancel, and to send a CancelJob request.
Parameters:
-
id
(Id)
–
The identifier of the pipeline to update.
-
status
(PipelineStatus)
–
The desired status of the pipeline:
Raises:
-
AccessDeniedException
–
General authentication failure. The request was not signed correctly.
-
InternalServiceException
–
Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.
-
ResourceInUseException
–
The resource you are attempting to change is in use. For example, you are attempting to delete a pipeline that is currently in use.
-
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 update_pipeline_status(
self,
id: "capo_elastic_transcoder.types.id.Id",
status: "capo_elastic_transcoder.types.pipeline_status.PipelineStatus",
*,
config_overrides: Optional[AsyncElasticTranscoderClientConfig] = None,
) -> "capo_elastic_transcoder.types.update_pipeline_status_response.UpdatePipelineStatusResponse":
"""<p>The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of jobs.</p> <p>Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for the jobs that you want to cancel, and to send a <a>CancelJob</a> request. </p>
Args:
id: <p>The identifier of the pipeline to update.</p>
status: <p>The desired status of the pipeline:</p> <ul> <li> <p> <code>Active</code>: The pipeline is processing jobs.</p> </li> <li> <p> <code>Paused</code>: The pipeline is not currently processing jobs.</p> </li> </ul>
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_in_use_exception.ResourceInUseException: <p>The resource you are attempting to change is in use. For example, you are attempting to delete a pipeline that is currently in use.</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.update_pipeline_status_request.UpdatePipelineStatusRequest]",
) -> AsyncOperationResponse[
"capo_elastic_transcoder.types.update_pipeline_status_response.UpdatePipelineStatusResponse"
]:
import capo_elastic_transcoder._operations.ets_customer_service.update_pipeline_status
(
output,
http_response,
) = await capo_elastic_transcoder._operations.ets_customer_service.update_pipeline_status.async_update_pipeline_status(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdatePipelineStatus")
)
input_: capo_elastic_transcoder.types.update_pipeline_status_request.UpdatePipelineStatusRequest = {
"id": id,
"status": status,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|