Publishing events from the Inventory service to IBM Cloud Object Storage

The events are published to IBM Cloud® Object Storage after the integration steps are completed. You can then download the data from IBM Cloud Object Storage for further processing.

You must provide the details of your IBM Cloud Object Storage endpoints to IBM to ensure that the events are published to the appropriate endpoint as a part of the integration process.
Note:
For each configurable event, you must provide the following details in the IBM support case requesting to set up a IBM Cloud Object Storage and configure the event subscriptions:

Authenticating IBM Cloud Object Storage

You can authenticate IBM Cloud Object Storage for event publishing with the following methods:
API key credentials
For more information, see IAM overview.
Provide the following details to authenticate:
HMAC credentials
For more information, see Using HMAC credentials.

Processing files

A file can contain up to 1000 events, but IBM does not automatically provide a count of how many events are recorded in the file. However, IBM provides a utility jar, cloud-storage-tools, upon request that can complete the following tasks:
  • Get the number of files in an IBM Cloud Object Storage bucket.
  • Download the files locally.
  • Count the number of events in the files.
  • Delete all files from the IBM Cloud Object Storage bucket.
To obtain this utility, open a case with IBM support and request access to the cloud-storage-tools utility.

For more information, see Getting started with IBM Cloud Object Storage.

Getting started with Software Development Kits

IBM Cloud Object Storage provides Software Development Kits (SDKs) for Java™, Python, NodeJS, and Go which can help you to make the most of IBM Cloud Object Storage to integrate to the Inventory Visibility event feed.

For instructions on downloading and installing the SDK and view code samples for running basic operations with object storage, see Getting started with the SDKs.

Java sample code

The Java sample code that is provided with Getting started with IBM Cloud Object Storage gives introductory examples of running the basic operations with Object Storage. This code example can be run multiple times because it uses Universally Unique Identifiers (UUIDs) for bucket and item names to prevent potential conflicts.

To run the code sample, you need to remove any angled brackets or other excess characters. You also need to replace the endpoint, api-key, resource-instance-id, and storage-class values with your endpoint information.

Copy the Java code block from the Getting started with IBM Cloud Object Storage Code example section, replace the necessary values with your information, and run the code sample.

For more information, see Using Java.

Python sample code

The Python code sample that is provided with Getting started with IBM Cloud Object Storage gives introductory examples of running the basic operations with Object Storage. This code example can be run multiple times because it uses Universally Unique Identifiers (UUIDs) for bucket and item names to prevent potential conflicts.

To run the code sample, you need to remove any angled brackets or other excess characters. You also need to replace the endpoint, api-key, resource-instance-id, and storage-class values with your endpoint information.

Copy the Python code block from the Getting started with IBM Cloud Object Storage Code example section, replace the necessary values with your information, and run the code sample.