Skip to content

get_data_set_import_task async

get_data_set_import_task(
    application_id: Identifier,
    task_id: Identifier,
    *,
    config_overrides: Optional[Asyncm2ClientConfig] = None,
) -> GetDataSetImportTaskResponse

Gets the status of a data set import task initiated with the CreateDataSetImportTask operation.

Parameters:

Raises:

Source code in docs_src/capo_m2/_services/async_m2.py
async def get_data_set_import_task(
    self,
    application_id: "capo_m2.types.identifier.Identifier",
    task_id: "capo_m2.types.identifier.Identifier",
    *,
    config_overrides: Optional[Asyncm2ClientConfig] = None,
) -> "capo_m2.types.get_data_set_import_task_response.GetDataSetImportTaskResponse":
    """<p>Gets the status of a data set import task initiated with the <a>CreateDataSetImportTask</a> operation.</p>

    Args:
        application_id: <p>The application identifier.</p>
        task_id: <p>The task identifier returned by the <a>CreateDataSetImportTask</a> operation. </p>

    Raises:
        capo_m2.errors.access_denied_exception.AccessDeniedException: <p>The account or role doesn't have the right permissions to make the request.</p>
        capo_m2.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
        capo_m2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_m2.errors.throttling_exception.ThrottlingException: <p>The number of requests made exceeds the limit.</p>
        capo_m2.errors.validation_exception.ValidationException: <p>One or more parameters provided in the request is not valid.</p>
        capo_m2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_m2.types.get_data_set_import_task_request.GetDataSetImportTaskRequest]",
    ) -> AsyncOperationResponse[
        "capo_m2.types.get_data_set_import_task_response.GetDataSetImportTaskResponse"
    ]:
        import capo_m2._operations.aws_supernova_control_plane_service.get_data_set_import_task

        (
            output,
            http_response,
        ) = await capo_m2._operations.aws_supernova_control_plane_service.get_data_set_import_task.async_get_data_set_import_task(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDataSetImportTask")
    )
    input_: capo_m2.types.get_data_set_import_task_request.GetDataSetImportTaskRequest = {
        "application_id": application_id,
        "task_id": task_id,
    }

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