:doc:`AgentsforBedrock <../../bedrock-agent>` / Client / delete_knowledge_base

*********************
delete_knowledge_base
*********************



.. py:method:: AgentsforBedrock.Client.delete_knowledge_base(**kwargs)

  

  Deletes a knowledge base. Before deleting a knowledge base, you should disassociate the knowledge base from any agents that it is associated with by making a `DisassociateAgentKnowledgeBase <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_DisassociateAgentKnowledgeBase.html>`__ request.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/DeleteKnowledgeBase>`_  


  **Request Syntax**
  ::

    response = client.delete_knowledge_base(
        knowledgeBaseId='string'
    )
    
  :type knowledgeBaseId: string
  :param knowledgeBaseId: **[REQUIRED]** 

    The unique identifier of the knowledge base to delete.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'knowledgeBaseId': 'string',
          'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **knowledgeBaseId** *(string) --* 

        The unique identifier of the knowledge base that was deleted.

        
      

      - **status** *(string) --* 

        The status of the knowledge base and whether it has been successfully deleted.

        
  
  **Exceptions**
  
  *   :py:class:`AgentsforBedrock.Client.exceptions.ThrottlingException`

  
  *   :py:class:`AgentsforBedrock.Client.exceptions.AccessDeniedException`

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

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

  
  *   :py:class:`AgentsforBedrock.Client.exceptions.ResourceNotFoundException`

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

  