Skip to content

describe_task async

describe_task(
    task_arn: TaskArn, *, config_overrides: Optional[AsyncDataSyncClientConfig] = None
) -> DescribeTaskResponse

Provides information about a task, which defines where and how DataSync transfers your data.

Parameters:

  • task_arn (TaskArn) –

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

Raises:

Source code in docs_src/capo_datasync/_services/async_data_sync.py
async def describe_task(
    self,
    task_arn: "capo_datasync.types.task_arn.TaskArn",
    *,
    config_overrides: Optional[AsyncDataSyncClientConfig] = None,
) -> "capo_datasync.types.describe_task_response.DescribeTaskResponse":
    """<p>Provides information about a <i>task</i>, which defines where and how DataSync transfers your data.</p>

    Args:
        task_arn: <p>Specifies the Amazon Resource Name (ARN) of the transfer task that you want information about.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datasync.types.describe_task_request.DescribeTaskRequest]",
    ) -> AsyncOperationResponse[
        "capo_datasync.types.describe_task_response.DescribeTaskResponse"
    ]:
        import capo_datasync._operations.fmrs_service.describe_task

        (
            output,
            http_response,
        ) = await capo_datasync._operations.fmrs_service.describe_task.async_describe_task(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTask")
    )
    input_: capo_datasync.types.describe_task_request.DescribeTaskRequest = {
        "task_arn": task_arn
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output