Retrieves a list of all the imports performed.
Parameters:
-
next_token
(Optional[String], default:
None
)
–
The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10.
-
max_results
(Optional[Integer], default:
None
)
–
The total number of items to return. The maximum value is 100.
Raises:
Source code in docs_src/capo_migrationhubstrategy/_services/async_migration_hub_strategy.py
| async def list_import_file_task(
self,
*,
config_overrides: Optional[AsyncMigrationHubStrategyClientConfig] = None,
next_token: Optional["capo_migrationhubstrategy.types.string.String"] = None,
max_results: Optional["capo_migrationhubstrategy.types.integer.Integer"] = None,
) -> "capo_migrationhubstrategy.types.list_import_file_task_response.ListImportFileTaskResponse":
"""<p> Retrieves a list of all the imports performed. </p>
Args:
next_token: <p> The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set <code>maxResults</code> to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10. </p>
max_results: <p> The total number of items to return. The maximum value is 100. </p>
Raises:
capo_migrationhubstrategy.errors.access_denied_exception.AccessDeniedException: <p> The user does not have permission to perform the action. Check the AWS Identity and Access Management (IAM) policy associated with this user.</p>
capo_migrationhubstrategy.errors.internal_server_exception.InternalServerException: <p> The server experienced an internal error. Try again. </p>
capo_migrationhubstrategy.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
capo_migrationhubstrategy.errors.validation_exception.ValidationException: <p> The request body isn't valid. </p>
capo_migrationhubstrategy.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_migrationhubstrategy.types.list_import_file_task_request.ListImportFileTaskRequest]",
) -> AsyncOperationResponse[
"capo_migrationhubstrategy.types.list_import_file_task_response.ListImportFileTaskResponse"
]:
import capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.list_import_file_task
(
output,
http_response,
) = await capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.list_import_file_task.async_list_import_file_task(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListImportFileTask")
)
input_: capo_migrationhubstrategy.types.list_import_file_task_request.ListImportFileTaskRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|