associateDefaultVocabulary method
Associates an existing vocabulary as the default. Contact Lens for Connect Customer uses the vocabulary in post-call and real-time analysis sessions for the given language.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
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 vocabularyId :
The identifier of the custom vocabulary. If this is empty, the default is
set to none.
Implementation
Future<void> associateDefaultVocabulary({
required String instanceId,
required VocabularyLanguageCode languageCode,
String? vocabularyId,
}) async {
final $payload = <String, dynamic>{
if (vocabularyId != null) 'VocabularyId': vocabularyId,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/default-vocabulary/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(languageCode.value)}',
exceptionFnMap: _exceptionFns,
);
}