:doc:`LexModelBuildingService <../../lex-models>` / Client / delete_bot

**********
delete_bot
**********



.. py:method:: LexModelBuildingService.Client.delete_bot(**kwargs)

  

  Deletes all versions of the bot, including the ``$LATEST`` version. To delete a specific version of the bot, use the  DeleteBotVersion operation. The ``DeleteBot`` operation doesn't immediately remove the bot schema. Instead, it is marked for deletion and removed later.

   

  Amazon Lex stores utterances indefinitely for improving the ability of your bot to respond to user inputs. These utterances are not removed when the bot is deleted. To remove the utterances, use the  DeleteUtterances operation.

   

  If a bot has an alias, you can't delete it. Instead, the ``DeleteBot`` operation returns a ``ResourceInUseException`` exception that includes a reference to the alias that refers to the bot. To remove the reference to the bot, delete the alias. If you get the same exception again, delete the referring alias until the ``DeleteBot`` operation is successful.

   

  This operation requires permissions for the ``lex:DeleteBot`` action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBot>`_  


  **Request Syntax**
  ::

    response = client.delete_bot(
        name='string'
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the bot. The name is case sensitive.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`LexModelBuildingService.Client.exceptions.NotFoundException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.ConflictException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.LimitExceededException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.InternalFailureException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.BadRequestException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.ResourceInUseException`

  