:doc:`Kafka <../../kafka>` / Client / delete_topic

************
delete_topic
************



.. py:method:: Kafka.Client.delete_topic(**kwargs)

  

  Deletes a topic in the specified MSK cluster.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DeleteTopic>`_  


  **Request Syntax**
  ::

    response = client.delete_topic(
        ClusterArn='string',
        TopicName='string'
    )
    
  :type ClusterArn: string
  :param ClusterArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) that uniquely identifies the cluster.

    

  
  :type TopicName: string
  :param TopicName: **[REQUIRED]** 

    The name of the topic to delete.

    

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

    
    ::

      {
          'TopicArn': 'string',
          'TopicName': 'string',
          'Status': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      200 response

      
      

      - **TopicArn** *(string) --* 

        The Amazon Resource Name (ARN) of the topic.

        
      

      - **TopicName** *(string) --* 

        The name of the topic that was deleted.

        
      

      - **Status** *(string) --* 

        The status of the topic deletion.

        
  
  **Exceptions**
  
  *   :py:class:`Kafka.Client.exceptions.NotFoundException`

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

  
  *   :py:class:`Kafka.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`Kafka.Client.exceptions.ForbiddenException`

  
  *   :py:class:`Kafka.Client.exceptions.ClusterConnectivityException`

  
  *   :py:class:`Kafka.Client.exceptions.KafkaTimeoutException`

  
  *   :py:class:`Kafka.Client.exceptions.UnknownTopicOrPartitionException`

  
  *   :py:class:`Kafka.Client.exceptions.ControllerMovedException`

  
  *   :py:class:`Kafka.Client.exceptions.NotControllerException`

  
  *   :py:class:`Kafka.Client.exceptions.ReassignmentInProgressException`

  
  *   :py:class:`Kafka.Client.exceptions.GroupSubscribedToTopicException`

  
  *   :py:class:`Kafka.Client.exceptions.KafkaRequestException`

  