Topic Operations - Amazon Managed Streaming for Apache Kafka
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Topic Operations

You can use Amazon MSK APIs to view information about topics in your MSK Provisioned cluster. These APIs provide read-only access to topic metadata, including partition counts, replication factors, configurations, and partition details. This information is useful for monitoring, troubleshooting, and understanding the structure of your Kafka topics.

Important

The ListTopics, DescribeTopic, and DescribeTopicPartitions APIs responses reflect data that updates approximately every minute. For the most current topic state after making changes, allow approximately one minute before querying.

Note

These APIs provide read-only access to topic metadata. To create or modify topics, use Apache Kafka tools or the Kafka AdminClient. For more information, see Step 4: Create a topic in the Amazon MSK cluster.

Requirements for viewing topic information

IAM permissions for viewing topic information

To call these APIs, you must have the appropriate IAM permissions. The following table lists the required permissions for each API.

Required permissions for viewing topic information
API Required Permissions Resource
ListTopics

kafka-cluster:Connect

kafka-cluster:DescribeTopic

Cluster ARN
DescribeTopic

kafka-cluster:Connect

kafka-cluster:DescribeTopic

kafka-cluster:DescribeTopicDynamicConfiguration

Topic ARN
DescribeTopicPartitions

kafka-cluster:Connect

kafka-cluster:DescribeTopic

kafka-cluster:DescribeTopicDynamicConfiguration

Topic ARN
Note

For ListTopics, specify the cluster ARN in your IAM policy. For DescribeTopic and DescribeTopicPartitions, specify the topic ARN in your IAM policy.

For more information about IAM access control for Amazon MSK, see IAM access control.