getVocabulary method

Future<GetVocabularyResponse> getVocabulary({
  1. required String vocabularyName,
})

Provides information about the specified custom vocabulary.

To view the status of the specified custom vocabulary, check the VocabularyState field. If the status is READY, your custom vocabulary is available to use. If the status is FAILED, FailureReason provides details on why your custom vocabulary failed.

To get a list of your custom vocabularies, use the operation.

May throw BadRequestException. May throw InternalFailureException. May throw LimitExceededException. May throw NotFoundException.

Parameter vocabularyName : The name of the custom vocabulary you want information about. Custom vocabulary names are case sensitive.

Implementation

Future<GetVocabularyResponse> getVocabulary({
  required String vocabularyName,
}) async {
  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);
}