Kafka / Client / list_topics
list_topics¶
- Kafka.Client.list_topics(**kwargs)¶
List topics in a MSK cluster.
See also: AWS API Documentation
Request Syntax
response = client.list_topics( ClusterArn='string', MaxResults=123, NextToken='string', TopicNameFilter='string' )
- Parameters:
ClusterArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) that uniquely identifies the cluster.
MaxResults (integer) – The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.
NextToken (string) – The paginated results marker. When the result of the operation is truncated, the call returns NextToken in the response. To get the next batch, provide this token in your next request.
TopicNameFilter (string) – Returns topics starting with given name.
- Return type:
dict
- Returns:
Response Syntax
{ 'Topics': [ { 'TopicArn': 'string', 'TopicName': 'string', 'ReplicationFactor': 123, 'PartitionCount': 123, 'OutOfSyncReplicaCount': 123 }, ], 'NextToken': 'string' }
Response Structure
(dict) –
200 response
Topics (list) –
List containing topics info.
(dict) –
Includes identification info about the topic.
TopicArn (string) –
The Amazon Resource Name (ARN) of the topic.
TopicName (string) –
Name for a topic.
ReplicationFactor (integer) –
Replication factor for a topic.
PartitionCount (integer) –
Partition count for a topic.
OutOfSyncReplicaCount (integer) –
Number of out-of-sync replicas for a topic.
NextToken (string) –
The paginated results marker. When the result of a ListTopics operation is truncated, the call returns NextToken in the response. To get another batch of configurations, provide this token in your next request.
Exceptions
Kafka.Client.exceptions.ServiceUnavailableExceptionKafka.Client.exceptions.BadRequestExceptionKafka.Client.exceptions.UnauthorizedExceptionKafka.Client.exceptions.InternalServerErrorExceptionKafka.Client.exceptions.ForbiddenException