Skip to content

list_task_executions

list_task_executions(
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    task_arn: Optional[TaskArn] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListTaskExecutionsResponse

Returns a list of executions for an DataSync transfer task.

Parameters:

  • task_arn (Optional[TaskArn], default: None ) –

    Specifies the Amazon Resource Name (ARN) of the task that you want execution information about.

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

    Specifies how many results you want in the response.

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

    Specifies an opaque string that indicates the position at which to begin the next list of results in the response.

Raises:

Source code in docs_src/capo_datasync/_services/data_sync.py
def list_task_executions(
    self,
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    task_arn: Optional["capo_datasync.types.task_arn.TaskArn"] = None,
    max_results: Optional["capo_datasync.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_datasync.types.next_token.NextToken"] = None,
) -> "capo_datasync.types.list_task_executions_response.ListTaskExecutionsResponse":
    """<p>Returns a list of executions for an DataSync transfer task.</p>

    Args:
        task_arn: <p>Specifies the Amazon Resource Name (ARN) of the task that you want execution information about.</p>
        max_results: <p>Specifies how many results you want in the response.</p>
        next_token: <p>Specifies an opaque string that indicates the position at which to begin the next list of results in the response.</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.list_task_executions_request.ListTaskExecutionsRequest]",
    ) -> OperationResponse[
        "capo_datasync.types.list_task_executions_response.ListTaskExecutionsResponse"
    ]:
        import capo_datasync._operations.fmrs_service.list_task_executions

        output, http_response = (
            capo_datasync._operations.fmrs_service.list_task_executions.list_task_executions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTaskExecutions")
    )
    input_: capo_datasync.types.list_task_executions_request.ListTaskExecutionsRequest = {}
    if task_arn is not None:
        input_["task_arn"] = task_arn
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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