OCI Object Storage

You can use Helidon’s OCI SDK Extension to access OCI Services. This document describes how to use it to access OCI Object Storage.

Maven Coordinates

To enable OCI Object Storage add the following dependency to your project’s pom.xml (see Managing Dependencies).

<dependency>
     <groupId>io.helidon.integrations.oci.sdk</groupId>
     <artifactId>helidon-integrations-oci-sdk-cdi</artifactId>
</dependency>
Copied

Then add a dependency on the OCI SDK’s Object Storage API:

<dependency>
    <groupId>com.oracle.oci.sdk</groupId>
    <artifactId>oci-java-sdk-objectstorage</artifactId>
</dependency>
Copied

Injecting an Object Storage client

Once you have Helidon’s OCI extension added to your application you can inject OCI SDK Clients.

Field-injection example
 @Inject
 private ObjectStorage client;
Copied
Constructor-injection example
 private final ObjectStorage client;
 @Inject
 public YourConstructor(@Named("orders") ObjectStorage client) {
   super();
   this.client = client;
 }
Copied

The extension implements this injection point by creating an Object Storage client object in the singleton scope.

Configuring the Helidon OCI SDK Extension

By default the extension will select and configure an appropriate OCI Authentication Details Provider for you based on your environment. For this reason it is recommended that you configure your environment first and get it working with the OCI CLI before using the Helidon OCI SDK Extension.

For more information see Helidon OCI Extension.

Using the Object Storage client

Once you have injected an ObjectStorage client you can use it as described in: