Kafka / Client / delete_topic

delete_topic

Kafka.Client.delete_topic(**kwargs)

Deletes a topic in the specified MSK cluster.

See also: AWS API Documentation

Request Syntax

response = client.delete_topic(
    ClusterArn='string',
    TopicName='string'
)
Parameters:
  • ClusterArn (string) –

    [REQUIRED]

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

  • TopicName (string) –

    [REQUIRED]

    The name of the topic to delete.

Return type:

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

  • Kafka.Client.exceptions.NotFoundException

  • Kafka.Client.exceptions.BadRequestException

  • Kafka.Client.exceptions.InternalServerErrorException

  • Kafka.Client.exceptions.ForbiddenException

  • Kafka.Client.exceptions.ClusterConnectivityException

  • Kafka.Client.exceptions.KafkaTimeoutException

  • Kafka.Client.exceptions.UnknownTopicOrPartitionException

  • Kafka.Client.exceptions.ControllerMovedException

  • Kafka.Client.exceptions.NotControllerException

  • Kafka.Client.exceptions.ReassignmentInProgressException

  • Kafka.Client.exceptions.GroupSubscribedToTopicException

  • Kafka.Client.exceptions.KafkaRequestException