kafka get-topics
Get Kafka topics
Description
List the topics available in the cluster with the default options or get certain topic if topic name is provided
Synopsis
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Name of kafka cluster
Example: --cluster "cluster-1"
Default: default
Attributes: optional
topics
- (string)
topic name that need to be fetched from cluster
Example: "topics-1"
Default: _None_
Attributes: optional, multiple allowed
Examples
Input:
Output:[
{
"test-topic-1": {
"num_partitions": 1,
"replication_factor": 1,
"replica_assignment": {
"0": {
"replica": [3]
}
},
"config_entries": {
"segment.bytes": "1073741824"
}
},
"test-topic-3": {
"num_partitions": 1,
"replication_factor": 1,
"replica_assignment": {
"0": {
"replica": [2]
}
},
"config_entries": {
"segment.bytes": "1073741824"
}
}
}
]
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "read" |
Service Type | "kafka" |
Service Instance | cluster |
Namespace | |
Object Type | "topic" |
Object ID | topics |
Please see Access Control for details.