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 conversational bot.

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

# create_bot method definition

def create_bot(
    self,
    *,
    botName: str,
    roleArn: str,
    dataPrivacy: DataPrivacyTypeDef,  # (1)
    idleSessionTTLInSeconds: int,
    description: str = ...,
    botTags: Mapping[str, str] = ...,
    testBotAliasTags: Mapping[str, str] = ...,
    botType: BotTypeType = ...,  # (2)
    botMembers: Sequence[BotMemberTypeDef] = ...,  # (3)
) -> CreateBotResponseTypeDef:  # (4)
    ...
  1. See DataPrivacyTypeDef
  2. See BotTypeType
  3. See BotMemberTypeDef
  4. See CreateBotResponseTypeDef
# create_bot method usage example with argument unpacking

kwargs: CreateBotRequestRequestTypeDef = {  # (1)
    "botName": ...,
    "roleArn": ...,
    "dataPrivacy": ...,
    "idleSessionTTLInSeconds": ...,
}

parent.create_bot(**kwargs)
  1. See CreateBotRequestRequestTypeDef

create_bot_alias#

Creates an alias for the specified version of a bot.

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

# create_bot_alias method definition

def create_bot_alias(
    self,
    *,
    botAliasName: str,
    botId: str,
    description: str = ...,
    botVersion: str = ...,
    botAliasLocaleSettings: Mapping[str, BotAliasLocaleSettingsTypeDef] = ...,  # (1)
    conversationLogSettings: ConversationLogSettingsTypeDef = ...,  # (2)
    sentimentAnalysisSettings: SentimentAnalysisSettingsTypeDef = ...,  # (3)
    tags: Mapping[str, str] = ...,
) -> CreateBotAliasResponseTypeDef:  # (4)
    ...
  1. See BotAliasLocaleSettingsTypeDef
  2. See ConversationLogSettingsTypeDef
  3. See SentimentAnalysisSettingsTypeDef
  4. See CreateBotAliasResponseTypeDef
# create_bot_alias method usage example with argument unpacking

kwargs: CreateBotAliasRequestRequestTypeDef = {  # (1)
    "botAliasName": ...,
    "botId": ...,
}

parent.create_bot_alias(**kwargs)
  1. See CreateBotAliasRequestRequestTypeDef

create_bot_locale#

Creates a locale in the bot.

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

# create_bot_locale method definition

def create_bot_locale(
    self,
    *,
    botId: str,
    botVersion: str,
    localeId: str,
    nluIntentConfidenceThreshold: float,
    description: str = ...,
    voiceSettings: VoiceSettingsTypeDef = ...,  # (1)
    generativeAISettings: GenerativeAISettingsTypeDef = ...,  # (2)
) -> CreateBotLocaleResponseTypeDef:  # (3)
    ...
  1. See VoiceSettingsTypeDef
  2. See GenerativeAISettingsTypeDef
  3. See CreateBotLocaleResponseTypeDef
# create_bot_locale method usage example with argument unpacking

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

parent.create_bot_locale(**kwargs)
  1. See CreateBotLocaleRequestRequestTypeDef

create_bot_version#

Creates an immutable version of the bot.

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

# create_bot_version method definition

def create_bot_version(
    self,
    *,
    botId: str,
    botVersionLocaleSpecification: Mapping[str, BotVersionLocaleDetailsTypeDef],  # (1)
    description: str = ...,
) -> CreateBotVersionResponseTypeDef:  # (2)
    ...
  1. See BotVersionLocaleDetailsTypeDef
  2. See CreateBotVersionResponseTypeDef
# create_bot_version method usage example with argument unpacking

kwargs: CreateBotVersionRequestRequestTypeDef = {  # (1)
    "botId": ...,
    "botVersionLocaleSpecification": ...,
}

parent.create_bot_version(**kwargs)
  1. See CreateBotVersionRequestRequestTypeDef

create_export#

Creates a zip archive containing the contents of a bot or a bot locale.

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

# create_export method definition

def create_export(
    self,
    *,
    resourceSpecification: ExportResourceSpecificationTypeDef,  # (1)
    fileFormat: ImportExportFileFormatType,  # (2)
    filePassword: str = ...,
) -> CreateExportResponseTypeDef:  # (3)
    ...
  1. See ExportResourceSpecificationTypeDef
  2. See ImportExportFileFormatType
  3. See CreateExportResponseTypeDef
# create_export method usage example with argument unpacking

kwargs: CreateExportRequestRequestTypeDef = {  # (1)
    "resourceSpecification": ...,
    "fileFormat": ...,
}

parent.create_export(**kwargs)
  1. See CreateExportRequestRequestTypeDef

create_intent#

Creates an intent.

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