listMigrations method
Lists migration jobs for an Amazon OpenSearch Service application. You can filter results by migration status. Use pagination to ensure that the operation returns quickly and successfully.
May throw AccessDeniedException.
May throw DisabledOperationException.
May throw InternalException.
May throw ValidationException.
Parameter applicationId :
The unique identifier of the OpenSearch application to list migrations
for.
Parameter maxResults :
The maximum number of results to return in a single call.
Parameter nextToken :
The pagination token from a previous call to retrieve the next set of
results.
Parameter status :
Filters the results by migration status. Valid values are
PENDING, IN_PROGRESS, SUCCEEDED,
and FAILED.
Implementation
Future<ListMigrationsResponse> listMigrations({
required String applicationId,
int? maxResults,
String? nextToken,
String? status,
}) async {
final $query = <String, List<String>>{
'applicationId': [applicationId],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (status != null) 'status': [status],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/2021-01-01/opensearch/app-migrations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListMigrationsResponse.fromJson(response);
}