| copyright |
|
||
|---|---|---|---|
| lastupdated | 2019-10-09 | ||
| keywords | IBM Event Streams, Kafka as a service, managed Apache Kafka | ||
| subcollection | EventStreams |
{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:pre: .pre}
{: #cli_reference}
If you want information about how to install the CLI for {{site.data.keyword.messagehub}}, see Getting started with the {{site.data.keyword.messagehub}} CLI .
{: #es_cli_changelog}
| Version | Release date | Changes |
|---|---|---|
| v1.0 | May 12 2019 | Initial release of the {{site.data.keyword.messagehub}} CLI |
| v1.0.1 | May 27 2019 |
|
| v2.0 | August 21 2019 |
|
| v2.1 | June 24 2020 |
|
| v2.1.1 | July 10 2020 |
|
| v2.2.0 | August 3 2020 |
|
| v2.2.1 | August 7 2020 |
|
| v2.3 | November 9 2020 |
|
{: #ibmcloud_es_init}
Initialize the {{site.data.keyword.messagehub}} plugin.
ibmcloud es init [-i|--instance-name INSTANCE_NAME] [-a|--api-url API_ENDPOINT_URL]
{:codeblock}
Prerequisites: None
Command options:
- --instance-name value, -i value (optional)
- Name of the {{site.data.keyword.messagehub}} instance.
- --api-url value, -a value (optional)
- Kafka admin URL of the {{site.data.keyword.messagehub}} instance.
## ibmcloud es broker {: #ibmcloud_es_broker}
Display the details of a broker.
ibmcloud es broker [--broker] ID [--json]
{:codeblock}
Prerequisites: None
Command options: {: #broker-req-params}
- --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 {: #ibmcloud_es_broker_config}
Display the configuration of a broker.
ibmcloud es broker-config [--broker] ID [--filter FILTER] [--verbose] [--json]
{:codeblock}
Prerequisites: None
Command options: {: #broker_config_params}
- --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 using wildcards (*) or a regular expression with forward slash (/) delimiters.
- --verbose, -v (optional)
- Display verbose configuration information.
- --filter value, -f value(optional)
- --json (optional)
- Output format in JSON.
## ibmcloud es cluster {: #ibmcloud_es_cluster}
Display the details of the cluster
ibmcloud es cluster [--json]
{:codeblock}
Prerequisites: None
Command options: {: #es_cluster_params}
- --json (optional)
- Output format in JSON.
{: #ibmcloud_es_topic}
Display the details of a topic.
ibmcloud es topic [--name] TOPIC_NAME [--json]
{:codeblock}
Prerequisites: None
Command options: {: #es_topic_params}
- --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]* ]*
{:codeblock}
Prerequisites: None
Command options: {: #es_topic_create_params}
- --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 is a list of 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]
{:codeblock}
Prerequisites: None
Command options: {: #es_topic_delete_params}
- --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]
{:codeblock}
Prerequisites: None
Command options: {: #es_topic_delete_records_params}
- --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
{:codeblock}
Prerequisites: None
Command options: {: #ibmcloud_es_topic_partitions_set_params}
- --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]
{:codeblock}
Prerequisites: None
Command options: {: #ibmcloud_es_topic_update_params}
- --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 should 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 is a list of valid configuration keys: cleanup.policy retention.ms retention.bytes segment.bytes segment.ms segment.index.bytes
- --default, -d (optional)
- Reset each configuration parameter specified using '--config' to its default value.
{: #ibmcloud_es_topics}
List topics.
ibmcloud es topics [--filter FILTER] [--json]
{:codeblock}
Prerequisites: None
Command options: {: #ibmcloud_es_topics_params}
- --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]
{:codeblock}
Prerequisites: None
Command options: {: #ibmcloud_es_group_params}
- --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]
{:codeblock}
Prerequisites: None
Command options: {: #ibmcloud_es_group_reset_params}
- --group value, -g value
- Consumer group ID
- --topic value, -t value
- Topic name. Apply to just this topic. Omit if '--all-topics' flag has been supplied.
- --all-topics, -a
- Apply to all topics assigned to the group. Omit if '--topic' flag has been supplied.
- --mode value, -m value
- One of the following: '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]
{:codeblock}
Prerequisites: None
Command options: {: #ibmcloud_es_groups_params}
- --filter value, -f value (optional)
- Optional. Filter the list of consumer groups 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]
{:codeblock}
Prerequisites: None
Command options: {: #ibmcloud_es_group_delete_params}
- --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]
{:codeblock}
Prerequisites: Mirroring enabled on {{site.data.keyword.messagehub}} instance. es plugin configured to connect to the mirroring target cluster via ibmcloud es init.
Command options: {: #ibmcloud_es_mirroring_topic_selection_params}
- --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]
{:codeblock}
Prerequisites: Mirroring enabled on {{site.data.keyword.messagehub}} instance. es plugin configured to connect to the mirroring target cluster via ibmcloud es init.
Command options: {: #ibmcloud_es_mirroring_topic_selection_set_params}
- --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.