Skip to main content

topic_partitions

Creates, updates, deletes, gets or lists a topic_partitions resource.

Overview

Nametopic_partitions
TypeResource
Idaws.kafka.topic_partitions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
israrrayThe list of in-sync replica broker IDs for the partition.
leaderintegerThe leader broker ID for the partition.
partitionintegerThe partition ID.
replicasarrayThe list of replica broker IDs for the partition.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_topic_partitionsselectcluster_arn, topic_name, regionmaxResults, nextTokenReturns partition details of this topic on a MSK cluster.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cluster_arnstringThe Amazon Resource Name (ARN) that uniquely identifies the cluster.
regionstringAWS region (default: us-east-1)
topic_namestringThe Kafka topic name that uniquely identifies the topic.
maxResultsintegerThe maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.
nextTokenstringThe 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.

SELECT examples

Returns partition details of this topic on a MSK cluster.

SELECT
isr,
leader,
partition,
replicas
FROM aws.kafka.topic_partitions
WHERE cluster_arn = '{{ cluster_arn }}' -- required
AND topic_name = '{{ topic_name }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;