Skip to content

LexModelsV2Client#

Index > LexModelsV2 > LexModelsV2Client

Auto-generated documentation for LexModelsV2 type annotations stubs module mypy-boto3-lexv2-models.

LexModelsV2Client#

Type annotations and code completion for boto3.client("lexv2-models"). boto3 documentation

# LexModelsV2Client usage example

from boto3.session import Session
from mypy_boto3_lexv2_models.client import LexModelsV2Client

def get_lexv2-models_client() -> LexModelsV2Client:
    return Session().client("lexv2-models")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("lexv2-models").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("lexv2-models")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.PreconditionFailedException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_lexv2_models.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods#

batch_create_custom_vocabulary_item#

Create a batch of custom vocabulary items for a given bot locale's custom vocabulary.

Type annotations and code completion for boto3.client("lexv2-models").batch_create_custom_vocabulary_item method. boto3 documentation

# batch_create_custom_vocabulary_item method definition

def batch_create_custom_vocabulary_item(
    self,
    *,
    botId: str,
    botVersion: str,
    localeId: str,
    customVocabularyItemList: Sequence[NewCustomVocabularyItemTypeDef],  # (1)
) -> BatchCreateCustomVocabularyItemResponseTypeDef:  # (2)
    ...
  1. See NewCustomVocabularyItemTypeDef
  2. See BatchCreateCustomVocabularyItemResponseTypeDef
# batch_create_custom_vocabulary_item method usage example with argument unpacking

kwargs: BatchCreateCustomVocabularyItemRequestRequestTypeDef = {  # (1)
    "botId": ...,
    "botVersion": ...,
    "localeId": ...,
    "customVocabularyItemList": ...,
}

parent.batch_create_custom_vocabulary_item(**kwargs)
  1. See BatchCreateCustomVocabularyItemRequestRequestTypeDef

batch_delete_custom_vocabulary_item#

Delete a batch of custom vocabulary items for a given bot locale's custom vocabulary.

Type annotations and code completion for boto3.client("lexv2-models").batch_delete_custom_vocabulary_item method. boto3 documentation

# batch_delete_custom_vocabulary_item method definition

def batch_delete_custom_vocabulary_item(
    self,
    *,
    botId: str,
    botVersion: str,
    localeId: str,
    customVocabularyItemList: Sequence[CustomVocabularyEntryIdTypeDef],  # (1)
) -> BatchDeleteCustomVocabularyItemResponseTypeDef:  # (2)
    ...
  1. See CustomVocabularyEntryIdTypeDef
  2. See BatchDeleteCustomVocabularyItemResponseTypeDef
# batch_delete_custom_vocabulary_item method usage example with argument unpacking

kwargs: BatchDeleteCustomVocabularyItemRequestRequestTypeDef = {  # (1)
    "botId": ...,
    "botVersion": ...,
    "localeId": ...,
    "customVocabularyItemList": ...,
}

parent.batch_delete_custom_vocabulary_item(**kwargs)
  1. See BatchDeleteCustomVocabularyItemRequestRequestTypeDef

batch_update_custom_vocabulary_item#

Update a batch of custom vocabulary items for a given bot locale's custom vocabulary.

Type annotations and code completion for boto3.client("lexv2-models").batch_update_custom_vocabulary_item method. boto3 documentation

# batch_update_custom_vocabulary_item method definition

def batch_update_custom_vocabulary_item(
    self,
    *,
    botId: str,
    botVersion: str,
    localeId: str,
    customVocabularyItemList: Sequence[CustomVocabularyItemTypeDef],  # (1)
) -> BatchUpdateCustomVocabularyItemResponseTypeDef:  # (2)
    ...
  1. See CustomVocabularyItemTypeDef
  2. See BatchUpdateCustomVocabularyItemResponseTypeDef
# batch_update_custom_vocabulary_item method usage example with argument unpacking

kwargs: BatchUpdateCustomVocabularyItemRequestRequestTypeDef = {  # (1)
    "botId": ...,
    "botVersion": ...,
    "localeId": ...,
    "customVocabularyItemList": ...,
}

parent.batch_update_custom_vocabulary_item(**kwargs)
  1. See BatchUpdateCustomVocabularyItemRequestRequestTypeDef

build_bot_locale#

Builds a bot, its intents, and its slot types into a specific locale.

Type annotations and code completion for boto3.client("lexv2-models").build_bot_locale method. boto3 documentation

# build_bot_locale method definition

def build_bot_locale(
    self,
    *,
    botId: str,
    botVersion: str,
    localeId: str,
) -> BuildBotLocaleResponseTypeDef:  # (1)
    ...
  1. See BuildBotLocaleResponseTypeDef
# build_bot_locale method usage example with argument unpacking

kwargs: BuildBotLocaleRequestRequestTypeDef = {  # (1)
    "botId": ...,
    "botVersion": ...,
    "localeId": ...,
}

parent.build_bot_locale(**kwargs)
  1. See BuildBotLocaleRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("lexv2-models").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("lexv2-models").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_bot#

Creates an Amazon Lex conversationa