Returns the description of specific Amazon FSx for Lustre or Amazon File Cache data repository tasks, if one or more TaskIds values are provided in the request, or if filters are used in the request. You can use filters to narrow the response to include just tasks for specific file systems or caches, or tasks in a specific lifecycle state. Otherwise, it returns all data repository tasks owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.
When retrieving all tasks, you can paginate the response by using the optional MaxResults parameter to limit the number of tasks returned in a response. If more tasks remain, a NextToken value is returned in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.
Parameters:
-
task_ids
(Optional[TaskIds], default:
None
)
–
(Optional) IDs of the tasks whose descriptions you want to retrieve (String).
-
filters
(Optional[DataRepositoryTaskFilters], default:
None
)
–
(Optional) You can use filters to narrow the DescribeDataRepositoryTasks response to include just tasks for specific file systems, or tasks in a specific lifecycle state.
Raises:
Source code in docs_src/capo_fsx/_services/async_f_sx.py
| async def describe_data_repository_tasks(
self,
*,
config_overrides: Optional[AsyncFSxClientConfig] = None,
task_ids: Optional["capo_fsx.types.task_ids.TaskIds"] = None,
filters: Optional[
"capo_fsx.types.data_repository_task_filters.DataRepositoryTaskFilters"
] = None,
max_results: Optional["capo_fsx.types.max_results.MaxResults"] = None,
next_token: Optional["capo_fsx.types.next_token.NextToken"] = None,
) -> "capo_fsx.types.describe_data_repository_tasks_response.DescribeDataRepositoryTasksResponse":
"""<p>Returns the description of specific Amazon FSx for Lustre or Amazon File Cache data repository tasks, if one or more <code>TaskIds</code> values are provided in the request, or if filters are used in the request. You can use filters to narrow the response to include just tasks for specific file systems or caches, or tasks in a specific lifecycle state. Otherwise, it returns all data repository tasks owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.</p> <p>When retrieving all tasks, you can paginate the response by using the optional <code>MaxResults</code> parameter to limit the number of tasks returned in a response. If more tasks remain, a <code>NextToken</code> value is returned in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p>
Args:
task_ids: <p>(Optional) IDs of the tasks whose descriptions you want to retrieve (String).</p>
filters: <p>(Optional) You can use filters to narrow the <code>DescribeDataRepositoryTasks</code> response to include just tasks for specific file systems, or tasks in a specific lifecycle state.</p>
Raises:
capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
capo_fsx.errors.data_repository_task_not_found.DataRepositoryTaskNotFound: <p>The data repository task or tasks you specified could not be found.</p>
capo_fsx.errors.file_system_not_found.FileSystemNotFound: <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_fsx.types.describe_data_repository_tasks_request.DescribeDataRepositoryTasksRequest]",
) -> AsyncOperationResponse[
"capo_fsx.types.describe_data_repository_tasks_response.DescribeDataRepositoryTasksResponse"
]:
import capo_fsx._operations.aws_simba_api_service_v20180301.describe_data_repository_tasks
(
output,
http_response,
) = await capo_fsx._operations.aws_simba_api_service_v20180301.describe_data_repository_tasks.async_describe_data_repository_tasks(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeDataRepositoryTasks")
)
input_: capo_fsx.types.describe_data_repository_tasks_request.DescribeDataRepositoryTasksRequest = {}
if task_ids is not None:
input_["task_ids"] = task_ids
if filters is not None:
input_["filters"] = filters
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|