searchVocabularies method
Searches for vocabularies within a specific Connect Customer instance
using State, NameStartsWith, and
LanguageCode.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidRequestException.
May throw ThrottlingException.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter languageCode :
The language code of the vocabulary entries. For a list of languages and
their corresponding language codes, see What
is Amazon Transcribe?
Parameter maxResults :
The maximum number of results to return per page.
Parameter nameStartsWith :
The starting pattern of the name of the vocabulary.
Parameter nextToken :
The token for the next set of results. Use the value returned in the
previous response in the next request to retrieve the next set of results.
Parameter state :
The current state of the custom vocabulary.
Implementation
Future<SearchVocabulariesResponse> searchVocabularies({
required String instanceId,
VocabularyLanguageCode? languageCode,
int? maxResults,
String? nameStartsWith,
String? nextToken,
VocabularyState? state,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
if (languageCode != null) 'LanguageCode': languageCode.value,
if (maxResults != null) 'MaxResults': maxResults,
if (nameStartsWith != null) 'NameStartsWith': nameStartsWith,
if (nextToken != null) 'NextToken': nextToken,
if (state != null) 'State': state.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/vocabulary-summary/${Uri.encodeComponent(instanceId)}',
exceptionFnMap: _exceptionFns,
);
return SearchVocabulariesResponse.fromJson(response);
}