describeDataRepositoryTasks method
Returns the description of specific Amazon FSx for Lustre 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
tasks in a specific lifecycle state. Otherwise, it returns all data
repository tasks owned by your AWS account in the AWS 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, Amazon FSx returns a
NextToken
value 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 FileSystemNotFound. May throw DataRepositoryTaskNotFound. 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,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
255,
);
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);
}