Updates the configuration of a running DataSync task execution.
Currently, the only Option that you can modify with UpdateTaskExecution is BytesPerSecond , which throttles bandwidth for a running or queued task execution.
Parameters:
-
task_execution_arn
(TaskExecutionArn)
–
Specifies the Amazon Resource Name (ARN) of the task execution that you're updating.
Raises:
Source code in docs_src/capo_datasync/_services/data_sync.py
| def update_task_execution(
self,
task_execution_arn: "capo_datasync.types.task_execution_arn.TaskExecutionArn",
options: "capo_datasync.types.options.Options",
*,
config_overrides: Optional[DataSyncClientConfig] = None,
) -> (
"capo_datasync.types.update_task_execution_response.UpdateTaskExecutionResponse"
):
"""<p>Updates the configuration of a running DataSync task execution.</p> <note> <p>Currently, the only <code>Option</code> that you can modify with <code>UpdateTaskExecution</code> is <code> <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-BytesPerSecond">BytesPerSecond</a> </code>, which throttles bandwidth for a running or queued task execution.</p> </note>
Args:
task_execution_arn: <p>Specifies the Amazon Resource Name (ARN) of the task execution that you're updating.</p>
Raises:
capo_datasync.errors.internal_exception.InternalException: <p>This exception is thrown when an error occurs in the DataSync service.</p>
capo_datasync.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
capo_datasync.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_datasync.types.update_task_execution_request.UpdateTaskExecutionRequest]",
) -> OperationResponse[
"capo_datasync.types.update_task_execution_response.UpdateTaskExecutionResponse"
]:
import capo_datasync._operations.fmrs_service.update_task_execution
output, http_response = (
capo_datasync._operations.fmrs_service.update_task_execution.update_task_execution(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateTaskExecution")
)
input_: capo_datasync.types.update_task_execution_request.UpdateTaskExecutionRequest = {
"task_execution_arn": task_execution_arn,
"options": options,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|