LexModelsV2 / Client / delete_bot
delete_bot#
- LexModelsV2.Client.delete_bot(**kwargs)#
Deletes all versions of a bot, including the
Draftversion. To delete a specific version, use theDeleteBotVersionoperation.When you delete a bot, all of the resources contained in the bot are also deleted. Deleting a bot removes all locales, intents, slot, and slot types defined for the bot.
If a bot has an alias, the
DeleteBotoperation returns aResourceInUseExceptionexception. If you want to delete the bot and the alias, set theskipResourceInUseCheckparameter totrue.See also: AWS API Documentation
Request Syntax
response = client.delete_bot( botId='string', skipResourceInUseCheck=True|False )
- Parameters:
botId (string) –
[REQUIRED]
The identifier of the bot to delete.
skipResourceInUseCheck (boolean) – By default, Amazon Lex checks if any other resource, such as an alias or bot network, is using the bot version before it is deleted and throws a
ResourceInUseExceptionexception if the bot is being used by another resource. Set this parameter totrueto skip this check and remove the bot even if it is being used by another resource.
- Return type:
dict
- Returns:
Response Syntax
{ 'botId': 'string', 'botStatus': 'Creating'|'Available'|'Inactive'|'Deleting'|'Failed'|'Versioning'|'Importing'|'Updating' }
Response Structure
(dict) –
botId (string) –
The unique identifier of the bot that Amazon Lex is deleting.
botStatus (string) –
The current status of the bot. The status is
Deletingwhile the bot and its associated resources are being deleted.
Exceptions
LexModelsV2.Client.exceptions.ThrottlingExceptionLexModelsV2.Client.exceptions.ServiceQuotaExceededExceptionLexModelsV2.Client.exceptions.ValidationExceptionLexModelsV2.Client.exceptions.ConflictExceptionLexModelsV2.Client.exceptions.PreconditionFailedExceptionLexModelsV2.Client.exceptions.InternalServerException