LexModelsV2.Client.
batch_update_custom_vocabulary_item
(**kwargs)¶Update a batch of custom vocabulary items for a given bot locale's custom vocabulary.
See also: AWS API Documentation
Request Syntax
response = client.batch_update_custom_vocabulary_item(
botId='string',
botVersion='string',
localeId='string',
customVocabularyItemList=[
{
'itemId': 'string',
'phrase': 'string',
'weight': 123,
'displayAs': 'string'
},
]
)
[REQUIRED]
The identifier of the bot associated with this custom vocabulary
[REQUIRED]
The identifier of the version of the bot associated with this custom vocabulary.
[REQUIRED]
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.
[REQUIRED]
A list of custom vocabulary items with updated fields. Each entry must contain a phrase and can optionally contain a displayAs and/or a weight.
The unique custom vocabulary item from the custom vocabulary list.
The unique item identifer for the custom vocabulary item from the custom vocabulary list.
The unique phrase for the custom vocabulary item from the custom vocabulary list.
The weight assigned for the custom vocabulary item from the custom vocabulary list.
The DisplayAs value for the custom vocabulary item from the custom vocabulary list.
dict
Response Syntax
{
'botId': 'string',
'botVersion': 'string',
'localeId': 'string',
'errors': [
{
'itemId': 'string',
'errorMessage': 'string',
'errorCode': 'DUPLICATE_INPUT'|'RESOURCE_DOES_NOT_EXIST'|'RESOURCE_ALREADY_EXISTS'|'INTERNAL_SERVER_FAILURE'
},
],
'resources': [
{
'itemId': 'string',
'phrase': 'string',
'weight': 123,
'displayAs': 'string'
},
]
}
Response Structure
(dict) --
botId (string) --
The identifier of the bot associated with this custom vocabulary.
botVersion (string) --
The identifier of the version of the bot associated with this custom vocabulary.
localeId (string) --
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.
errors (list) --
A list of custom vocabulary items that failed to update during the operation. The reason for the error is contained within each error object.
(dict) --
The unique failed custom vocabulary item from the custom vocabulary list.
itemId (string) --
The unique item identifer for the failed custom vocabulary item from the custom vocabulary list.
errorMessage (string) --
The error message for the failed custom vocabulary item from the custom vocabulary list.
errorCode (string) --
The unique error code for the failed custom vocabulary item from the custom vocabulary list.
resources (list) --
A list of custom vocabulary items that were successfully updated during the operation.
(dict) --
The unique custom vocabulary item from the custom vocabulary list.
itemId (string) --
The unique item identifer for the custom vocabulary item from the custom vocabulary list.
phrase (string) --
The unique phrase for the custom vocabulary item from the custom vocabulary list.
weight (integer) --
The weight assigned for the custom vocabulary item from the custom vocabulary list.
displayAs (string) --
The DisplayAs value for the custom vocabulary item from the custom vocabulary list.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingException
LexModelsV2.Client.exceptions.ServiceQuotaExceededException
LexModelsV2.Client.exceptions.ValidationException
LexModelsV2.Client.exceptions.ResourceNotFoundException
LexModelsV2.Client.exceptions.InternalServerException