describeDataRepositoryTasks method
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.
May throw BadRequest.
May throw DataRepositoryTaskNotFound.
May throw FileSystemNotFound.
May throw InternalServerError.
Parameter filters :
(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.
Parameter taskIds :
(Optional) IDs of the tasks whose descriptions you want to retrieve
(String).
Implementation
Future<DescribeDataRepositoryTasksResponse> describeDataRepositoryTasks({
List<DataRepositoryTaskFilter>? filters,
int? maxResults,
String? nextToken,
List<String>? taskIds,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
2147483647,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSimbaAPIService_v20180301.DescribeDataRepositoryTasks'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (taskIds != null) 'TaskIds': taskIds,
},
);
return DescribeDataRepositoryTasksResponse.fromJson(jsonResponse.body);
}