LexModelsV2 / Client / delete_bot

delete_bot#

LexModelsV2.Client.delete_bot(**kwargs)#

Deletes all versions of a bot, including the Draft version. To delete a specific version, use the DeleteBotVersion operation.

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 DeleteBot operation returns a ResourceInUseException exception. If you want to delete the bot and the alias, set the skipResourceInUseCheck parameter to true .

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 ResourceInUseException exception if the bot is being used by another resource. Set this parameter to true to 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 Deleting while the bot and its associated resources are being deleted.

Exceptions

  • LexModelsV2.Client.exceptions.ThrottlingException

  • LexModelsV2.Client.exceptions.ServiceQuotaExceededException

  • LexModelsV2.Client.exceptions.ValidationException

  • LexModelsV2.Client.exceptions.ConflictException

  • LexModelsV2.Client.exceptions.PreconditionFailedException

  • LexModelsV2.Client.exceptions.InternalServerException