getVocabulary method
Gets information about a vocabulary.
May throw NotFoundException. May throw LimitExceededException. May throw InternalFailureException. May throw BadRequestException.
Parameter vocabularyName
:
The name of the vocabulary to return information about. The name is case
sensitive.
Implementation
Future<GetVocabularyResponse> getVocabulary({
required String vocabularyName,
}) async {
ArgumentError.checkNotNull(vocabularyName, 'vocabularyName');
_s.validateStringLength(
'vocabularyName',
vocabularyName,
1,
200,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Transcribe.GetVocabulary'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'VocabularyName': vocabularyName,
},
);
return GetVocabularyResponse.fromJson(jsonResponse.body);
}