IBM Cloud Docs
Event Streams CLI reference

Event Streams CLI reference

If you want information about how to install the CLI for Event Streams, see Getting started with the Event Streams CLI.

Changelog

Table 1. Changelog for the Event Streams CLI plug-in
Version Release date Changes
v1.0 12 May 2019
  • Initial release of the Event Streams CLI.
v1.0.1 27 May 2019
  • Improved error message when you run the command without init.
  • Sorted instances list during init.
  • Translation update.
v2.0 21 August 2019
  • init: Removed the service-key requirement.
  • Added group-delete command. Updated translations of help text.
v2.1 24 June 2020
  • init: Displayed provision parameters for Enterprise instance.
  • Translation update.
v2.1.1 10 July 2020
  • Replaced whitelist with ´allowlist`.
  • Fixed color configuration.
  • Translation update.
v2.2.0 3 August 2020
  • Added support for the Mirroring feature.
v2.2.1 7 August 2020
  • init: Refined the display of IP allowlist.
v2.3 9 November 2020
  • Added support for configuring message audit on topic.
  • init: Display encryption key if parameter kms_key_crn is specified in provisioning.
v2.3.1 21 January 2021
  • Added support for Satellite plan.
v2.3.2 5 May 2022
  • Added support for Mac OS X M1/ARM.
  • init: Display Object Storage bucket if parameter cos_bucket_crn is specified in provisioning.
v2.4.0 28 Feb 2023
  • Added Kafka version to ibmcloud es cluster.
  • Updated Go to 1.9.6.
v2.4.1 05 Dec 2023
  • Added mirroring-active-topics and help commands.
v2.5.0 15 Dec 2023
  • Added schema-import commands.

ibmcloud es init

Initialize the Event Streams plug-in.

ibmcloud es init [-i|--instance-name INSTANCE_NAME] [-a|--api-url API_ENDPOINT_URL]

Prerequisites: None

Command options:

--instance-name value, -i value (optional)
Name of the Event Streams instance.
--api-url value, -a value (optional)
Kafka admin URL of the Event Streams instance.

ibmcloud es broker

Display the details of a broker.

ibmcloud es broker [--broker] ID [--json]

Prerequisites: None

Command options:

--broker value, -b value
Broker ID, you can specify with or without a preceding '--broker' flag.
--json (optional)
Output format in JSON.

ibmcloud es broker-config

Display the configuration of a broker.

ibmcloud es broker-config [--broker] ID [--filter FILTER] [--verbose] [--json]

Prerequisites: None

Command options:

--broker value, -b value
Broker ID, you can specify with or without a preceding '--broker' flag.
--filter value, -f value (optional)
Filter the list of configuration by using wildcards (*) or a regular expression with forward slash (/) delimiters.
--verbose, -v (optional)
Display verbose configuration information.
--json (optional)
Output format in JSON.

ibmcloud es cluster

Display the details of the cluster, including the Kafka version.

ibmcloud es cluster [--json]

Prerequisites: None

Command options:

--json (optional)
Output format in JSON.

ibmcloud es topic

Display the details of a topic.

ibmcloud es topic [--name] TOPIC_NAME [--json]

Prerequisites: None

Command options:

--name value, -n value
Topic name.
--json (optional)
Output format of JSON.

ibmcloud es topic-create

Create a new topic.

ibmcloud es topic-create [--name] TOPIC_NAME [--partitions PARTITIONS] [--config KEY=VALUE[;KEY=VALUE]* ]*

Prerequisites: None

Command options:

--name value, -n value

Topic name.

--partitions value, -p value

Set the number of partitions for the topic.

--config KEY=VALUE, -c KEY=VALUE(optional)

Set a configuration option for the topic as a KEY=VALUE pair.

You can specify multiple --config options. Each '--config' option can specify a semicolon-delimited list of assignments. The following list shows valid configuration keys:

  • cleanup.policy
  • retention.ms
  • retention.bytes
  • segment.bytes
  • segment.ms
  • segment.index.bytes

ibmcloud es topic-delete

Delete a topic.

ibmcloud es topic-delete [--name] TOPIC_NAME [--force]

Prerequisites: None

Command options:

--name value, -n value
Topic name.
--force, -f (optional)
Delete without confirmation.

ibmcloud es topic-delete-records

Delete records from a topic for a given offset.

ibmcloud es topic-delete-records [--name] TOPIC_NAME [--partition-offset PARTITION:OFFSET[;PARTITION:OFFSET]* ]* [--force]

Prerequisites: None

Command options:

--name value, -n value
Topic name.
--partition-offset PARTITION:OFFSET, -p PARTITION:OFFSET
The partition and offset to delete records from in PARTITION:OFFSET format.
You can specify multiple --partition-offset options or you can specify multiple PARTITION:OFFSET pairs with semicolon delimiters and surrounded with quotations: 'PARTITION1:OFFSET1;PARTITION2:OFFSET2;PARTITION3:OFFSET3'.
--force, -f (optional)
Delete records without confirmation.

ibmcloud es topic-partitions-set

Set the partitions for a topic.

ibmcloud es topic-partitions-set [--name] TOPIC_NAME --partitions PARTITIONS

Prerequisites: None

Command options:

--name value, -n value
Topic name.
--partitions value, -p value
Set the number of partitions for the topic.

ibmcloud es topic-update

Update the configuration for a topic.

ibmcloud es topic-update [--name] TOPIC_NAME --config KEY[=VALUE][;KEY[=VALUE]]* [--default]

Prerequisites: None

Command options:

--name value, -n value

Topic name.

--config KEY[=VALUE], -c KEY[=VALUE]

Set a configuration option for the topic as a KEY[=VALUE] pair.

If VALUE is not given, the '--default' flag is to be specified to indicate resetting the configuration value back to the default. Multiple '--config' options can be specified. Each '--config' option can specify a semicolon-delimited list of assignments. The following list shows valid configuration keys:

  • cleanup.policy
  • retention.ms
  • retention.bytes
  • segment.bytes
  • segment.ms
  • segment.index.bytes
--default, -d (optional)

Reset each configuration parameter that is specified by using '--config' to its default value.

ibmcloud es topics

List topics.

ibmcloud es topics [--filter FILTER] [--json]

Prerequisites: None

Command options:

--filter value, -f value (optional)
Topic name.
--json (optional)
Format output in JSON. Up to 1000 topics are returned.

ibmcloud es group

Display details of a consumer group.

ibmcloud es group [--group] GROUP_ID [--json]

>Prerequisites: None

Command options:

--group value, -g value
Consumer group ID.
--json (optional)
Format output in JSON.

ibmcloud es group-reset

Reset the offsets for a consumer group.

ibmcloud es group-reset [--group] GROUP_ID [--topic TOPIC_NAME] [--all-topics] --mode MODE --value VALUE [--dry-run] [--execute] [--json]

Prerequisites: None

Command options:

--group value, -g value
Consumer group ID
--topic value, -t value
Topic name. Apply to just this topic. Omit if '--all-topics' flag was supplied.
--all-topics, -a
Apply to all topics assigned to the group. Omit if '--topic' flag was supplied.
--mode value, -m value
One of the following values: 'earliest', 'latest' or 'datetime'.
--value value, -v value
Value for resetting offsets, based on '--mode'. Omit for 'earliest' and 'latest'. 'datetime': use 'YYYY-MM-DDTHH:mm:SS.sss[±hh:mm|Z]'.
--dry-run (optional)
Show results and do not implement the changes.
--execute (optional)
Execute the changes to the offsets.
--json (optional)
Format output in JSON.

ibmcloud es groups

List consumer groups.

ibmcloud es groups [--filter FILTER] [--json]

Prerequisites: None

Command options:

--filter value, -f value (optional)
Optional. Filter the list of consumer groups by using wildcards (*) or a regular expression with forward slash (/) delimiters.
--json (optional)
Format output in JSON. A maximum of 1000 groups are returned.

ibmcloud es group-delete

Delete a consumer group.

ibmcloud es group-delete [--group] GROUP_ID [--force]

Prerequisites: None

Command options:

--group value, -g value
Consumer group ID
--force, -f (optional)
Delete group without confirmation.

ibmcloud es mirroring-topic-selection

List mirroring topic selection.

ibmcloud es mirroring-topic-selection [--json]

Prerequisites: Mirroring enabled on Event Streams instance. Event Streams plug-in configured to connect to the mirroring target cluster through ibmcloud es init.

Command options:

--json (optional)
Format output in JSON.

ibmcloud es mirroring-topic-selection-set

Replace mirroring topic selection.

ibmcloud es mirroring-topic-selection-set (--select pattern1,pattern2 | --none) [--force]

Prerequisites: Mirroring enabled on Event Streams instance. Event Streams plug-in configured to connect to the mirroring target cluster through ibmcloud es init.

Command options:

--select value
Selection of topics to mirror as comma-separated regex patterns. Use '.*' to mirror all topics.
--none
Clear currently selected topics (disable mirroring of topics).
--force
Optional. Replace mirroring topic selection without confirmation.

ibmcloud es mirroring-active-topics

Get topics that are being actively mirrored.

ibmcloud es mirroring-active-topics [--json]

Prerequisites: Mirroring enabled on Event Streams instance. Event Streams plug-in configured to connect to the mirroring target cluster through ibmcloud es init.

Command options:

--json (optional)
Format output in JSON.

ibmcloud es help

Show help for a command, or list all commands.

ibmcloud es help [COMMAND]

Prerequisites: None

Command options:

COMMAND (optional)
Show help for a command.

ibmcloud es schema-import

Import a set of schemas into the registry from a zip file.

ibmcloud es schema-import [--file] ZIP_FILE_PATH

Prerequisites: This operation is permitted only on Enterprise instances as only the Enterprise plan includes a Schema Registry for using and managing schemas.

Command options:

--file value, -f value
Zip file path.