Event Streams CLI

Gen 2

To interact with Event Streams on Gen 2 via the CLI you must utilize the IBM Cloud Resource Controller's CLI. For more information, see the General Event Streams CLI (ibmcloud) commands.

The Event Streams plugin supports only Gen 1 instances. For Gen 2 instances, use the Resource Controller CLI.

Getting started - Create an instance

You can create an instance by using the following command:

ibmcloud resource service-instance-create <INSTANCE_NAME> <SERVICE_NAME> <SERVICE_PLAN_NAME> <LOCATION> -g <RESOURCE_GROUP>

Example command for Event Streams:

ibmcloud resource service-instance-create <INSTANCE_NAME> messagehub enterprise-gen2 ca-mon -g Default -p '{
   "dataservices":{
      "kafka": {
        "throughput_mb_s": 100,
        "storage_gb": 2000
      }
   }
}'

A number of additional options can also be specified in the parameter block.

"dataservices": {
    "kafka": {
        "storage_gb": 2000,
        "throughput_mb_s": 100,
    },
    "encryption": {
        "disk": "crn:v1..."
    },
    "options": {
        "iam_token_only": false,
        "metrics": ["topic", "partition", "consumers"]
    }
},

Getting information about your instance

You can get instance information using the following command:

ibmcloud resource service-instance <INSTANCE_NAME> -o JSON

Update your instance

To update your instance (this includes operations, such as scaling and modifying other parts of your service), use the following command:

ibmcloud resource service-instance-update <INSTANCE_NAME> -p '<{FIELDS_TO_UPDATE}>'

Example of full updates for Event Streams:

ibmcloud resource service-instance-update <INSTANCE_NAME> -p'{
   "dataservices":{
      "kafka": {
         "throughput_mb_s": 100, <------ Change to the value you desire
         "storage_gb": 4000 <------ Change to the value you desire
      },
   }
}'

Manage users

To create a user:

ibmcloud resource service-key-create NAME [ROLE_NAME] ( --instance-id SERVICE_INSTANCE_ID | --instance-name SERVICE_INSTANCE_NAME) [--service-id SERVICE_ID]

To delete a user:

ibmcloud resource service-key-delete ( NAME | ID ) [-g RESOURCE_GROUP]

Updating a user is not possible for VPC instances.