:doc:`LexModelsV2 <../../lexv2-models>` / Client / delete_bot

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



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteBot>`_  


  **Request Syntax**
  ::

    response = client.delete_bot(
        botId='string',
        skipResourceInUseCheck=True|False
    )
    
  :type botId: string
  :param botId: **[REQUIRED]** 

    The identifier of the bot to delete.

    

  
  :type skipResourceInUseCheck: boolean
  :param skipResourceInUseCheck: 

    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.

    

  
  
  :rtype: 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**
  
  *   :py:class:`LexModelsV2.Client.exceptions.ThrottlingException`

  
  *   :py:class:`LexModelsV2.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`LexModelsV2.Client.exceptions.ValidationException`

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

  
  *   :py:class:`LexModelsV2.Client.exceptions.PreconditionFailedException`

  
  *   :py:class:`LexModelsV2.Client.exceptions.InternalServerException`

  