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

*************************
describe_topic_partitions
*************************



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

  

  Returns partition details of this topic on a MSK cluster.

  

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


  **Request Syntax**
  ::

    response = client.describe_topic_partitions(
        ClusterArn='string',
        TopicName='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type ClusterArn: string
  :param ClusterArn: **[REQUIRED]** 

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

    

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

    The Kafka topic name that uniquely identifies the topic.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.

    

  
  :type NextToken: string
  :param NextToken: 

    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.

    

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

    
    ::

      {
          'Partitions': [
              {
                  'Partition': 123,
                  'Leader': 123,
                  'Replicas': [
                      123,
                  ],
                  'Isr': [
                      123,
                  ]
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      200 response

      
      

      - **Partitions** *(list) --* 

        The list of partition information for the topic.

        
        

        - *(dict) --* 

          Contains information about a topic partition.

          
          

          - **Partition** *(integer) --* 

            The partition ID.

            
          

          - **Leader** *(integer) --* 

            The leader broker ID for the partition.

            
          

          - **Replicas** *(list) --* 

            The list of replica broker IDs for the partition.

            
            

            - *(integer) --* 
        
          

          - **Isr** *(list) --* 

            The list of in-sync replica broker IDs for the partition.

            
            

            - *(integer) --* 
        
      
    
      

      - **NextToken** *(string) --* 

        The paginated results marker. When the result of a DescribeTopicPartitions operation is truncated, the call returns NextToken in the response. To get another batch of configurations, provide this token in your next request.

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

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

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

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

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

  