listImports method
Lists the imports for a bot, bot locale, or custom vocabulary. Imports are kept in the list for 7 days.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter botId :
The unique identifier that Amazon Lex assigned to the bot.
Parameter botVersion :
The version of the bot to list imports for.
Parameter filters :
Provides the specification of a filter used to limit the bots in the
response to only those that match the filter specification. You can only
specify one filter and one string to filter on.
Parameter localeId :
Specifies the locale that should be present in the list. If you don't
specify a resource type in the filters parameter, the list
contains both bot locales and custom vocabularies.
Parameter maxResults :
The maximum number of imports to return in each page of results. If there
are fewer results than the max page size, only the actual number of
results are returned.
Parameter nextToken :
If the response from the ListImports operation contains more
results than specified in the maxResults parameter, a token
is returned in the response.
Use the returned token in the nextToken parameter of a
ListImports request to return the next page of results. For a
complete set of results, call the ListImports operation until
the nextToken returned in the response is null.
Parameter sortBy :
Determines the field that the list of imports is sorted by. You can sort
by the LastUpdatedDateTime field in ascending or descending
order.
Implementation
Future<ListImportsResponse> listImports({
String? botId,
String? botVersion,
List<ImportFilter>? filters,
String? localeId,
int? maxResults,
String? nextToken,
ImportSortBy? sortBy,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $payload = <String, dynamic>{
if (botId != null) 'botId': botId,
if (botVersion != null) 'botVersion': botVersion,
if (filters != null) 'filters': filters,
if (localeId != null) 'localeId': localeId,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (sortBy != null) 'sortBy': sortBy,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/imports',
exceptionFnMap: _exceptionFns,
);
return ListImportsResponse.fromJson(response);
}