Skip to content

kafka get-brokers

get kafka brokers

Description

Get brokers in the cluster

Synopsis

kafka get-brokers
    [--site <site>]
    [--cluster <cluster>]
    [<broker_ids>]

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

broker_ids - (int)

     ids for the brokers that are to be fetched
     Example: 1
     Default: _None_      Attributes: optional, multiple allowed

Examples

Input:

! kafka get-brokers 1 2
Output:
[
  {
    "id": 1,
    "addr": "site-H81M-S:9093"
  },
  {
    "id": 2,
    "addr": "site-H81M-S:9094"
  }
]

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 "broker"
Object ID ",".join(broker_ids)

Please see Access Control for details.