getMigrations method
Gets a list of migrations between Amazon Lex V1 and Amazon Lex V2.
May throw BadRequestException.
May throw InternalFailureException.
May throw LimitExceededException.
Parameter maxResults :
The maximum number of migrations to return in the response. The default is
10.
Parameter migrationStatusEquals :
Filters the list to contain only migrations in the specified state.
Parameter nextToken :
A pagination token that fetches the next page of migrations. If the
response to this operation is truncated, Amazon Lex returns a pagination
token in the response. To fetch the next page of migrations, specify the
pagination token in the request.
Parameter sortByAttribute :
The field to sort the list of migrations by. You can sort by the Amazon
Lex V1 bot name or the date and time that the migration was started.
Parameter sortByOrder :
The order so sort the list.
Parameter v1BotNameContains :
Filters the list to contain only bots whose name contains the specified
string. The string is matched anywhere in bot name.
Implementation
Future<GetMigrationsResponse> getMigrations({
int? maxResults,
MigrationStatus? migrationStatusEquals,
String? nextToken,
MigrationSortAttribute? sortByAttribute,
SortOrder? sortByOrder,
String? v1BotNameContains,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (migrationStatusEquals != null)
'migrationStatusEquals': [migrationStatusEquals.value],
if (nextToken != null) 'nextToken': [nextToken],
if (sortByAttribute != null) 'sortByAttribute': [sortByAttribute.value],
if (sortByOrder != null) 'sortByOrder': [sortByOrder.value],
if (v1BotNameContains != null) 'v1BotNameContains': [v1BotNameContains],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/migrations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetMigrationsResponse.fromJson(response);
}