listCustomVocabularyItems method
Paginated list of custom vocabulary items for a given bot locale's custom vocabulary.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter botId :
The identifier of the version of the bot associated with this custom
vocabulary.
Parameter botVersion :
The bot version of the bot to the list custom vocabulary request.
Parameter localeId :
The identifier of the language and locale where this custom vocabulary is
used. The string must match one of the supported locales. For more
information, see Supported languages
(https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html).
Parameter maxResults :
The maximum number of items returned by the list operation.
Parameter nextToken :
The nextToken identifier to the list custom vocabulary request.
Implementation
Future<ListCustomVocabularyItemsResponse> listCustomVocabularyItems({
required String botId,
required String botVersion,
required String localeId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $payload = <String, dynamic>{
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/bots/${Uri.encodeComponent(botId)}/botversions/${Uri.encodeComponent(botVersion)}/botlocales/${Uri.encodeComponent(localeId)}/customvocabulary/DEFAULT/list',
exceptionFnMap: _exceptionFns,
);
return ListCustomVocabularyItemsResponse.fromJson(response);
}