Skip navigation links

Oracle Cloud Infrastructure Java SDK - 1.19.1

See: Description

Oracle Cloud Infrastructure Audit Service 
Package Description
com.oracle.bmc.audit  
com.oracle.bmc.audit.model  
com.oracle.bmc.audit.requests  
com.oracle.bmc.audit.responses  
Oracle Cloud Infrastructure Container Engine 
Package Description
com.oracle.bmc.containerengine  
com.oracle.bmc.containerengine.model  
com.oracle.bmc.containerengine.requests  
com.oracle.bmc.containerengine.responses  
Oracle Cloud Infrastructure Core Services (Compute/Virtual Network/Block Storage) 
Package Description
com.oracle.bmc.core  
com.oracle.bmc.core.model  
com.oracle.bmc.core.requests  
com.oracle.bmc.core.responses  
Oracle Cloud Infrastructure Database Service 
Package Description
com.oracle.bmc.database  
com.oracle.bmc.database.model  
com.oracle.bmc.database.requests  
com.oracle.bmc.database.responses  
Oracle Cloud Infrastructure DNS Service 
Package Description
com.oracle.bmc.dns  
com.oracle.bmc.dns.model  
com.oracle.bmc.dns.requests  
com.oracle.bmc.dns.responses  
Oracle Cloud Infrastructure Email Service 
Package Description
com.oracle.bmc.email  
com.oracle.bmc.email.model  
com.oracle.bmc.email.requests  
com.oracle.bmc.email.responses  
Oracle Cloud Infrastructure File Storage 
Package Description
com.oracle.bmc.filestorage  
com.oracle.bmc.filestorage.model  
com.oracle.bmc.filestorage.requests  
com.oracle.bmc.filestorage.responses  
Oracle Cloud Infrastructure Identity Service 
Package Description
com.oracle.bmc.identity  
com.oracle.bmc.identity.model  
com.oracle.bmc.identity.requests  
com.oracle.bmc.identity.responses  
Oracle Cloud Infrastructure Load Balancer Service 
Package Description
com.oracle.bmc.loadbalancer  
com.oracle.bmc.loadbalancer.model  
com.oracle.bmc.loadbalancer.requests  
com.oracle.bmc.loadbalancer.responses  
Oracle Cloud Infrastructure Object Storage Service 
Package Description
com.oracle.bmc.objectstorage  
com.oracle.bmc.objectstorage.model  
com.oracle.bmc.objectstorage.requests  
com.oracle.bmc.objectstorage.responses  
com.oracle.bmc.objectstorage.transfer  
Oracle Cloud Infrastructure Common Runtime 
Package Description
com.oracle.bmc  
com.oracle.bmc.auth  
com.oracle.bmc.auth.exception  
com.oracle.bmc.circuitbreaker  
com.oracle.bmc.common  
com.oracle.bmc.encryption  
com.oracle.bmc.http  
com.oracle.bmc.http.signing  
com.oracle.bmc.io  
com.oracle.bmc.model  
com.oracle.bmc.requests  
com.oracle.bmc.responses  
com.oracle.bmc.retrier  
com.oracle.bmc.util  
com.oracle.bmc.waiter  
Oracle Cloud Infrastructure Resource Search 
Package Description
com.oracle.bmc.resourcesearch  
com.oracle.bmc.resourcesearch.model  
com.oracle.bmc.resourcesearch.requests  
com.oracle.bmc.resourcesearch.responses  
Oracle Cloud Infrastructure Key Management 
Package Description
com.oracle.bmc.keymanagement  
com.oracle.bmc.keymanagement.model  
com.oracle.bmc.keymanagement.requests  
com.oracle.bmc.keymanagement.responses  
Oracle Cloud Infrastructure Announcements Service 
Package Description
com.oracle.bmc.announcementsservice  
com.oracle.bmc.announcementsservice.model  
com.oracle.bmc.announcementsservice.requests  
com.oracle.bmc.announcementsservice.responses  
Oracle Cloud Infrastructure Healthchecks 
Package Description
com.oracle.bmc.healthchecks  
com.oracle.bmc.healthchecks.model  
com.oracle.bmc.healthchecks.requests  
com.oracle.bmc.healthchecks.responses  
Oracle Cloud Infrastructure Waas 
Package Description
com.oracle.bmc.waas  
com.oracle.bmc.waas.model  
com.oracle.bmc.waas.requests  
com.oracle.bmc.waas.responses  
Oracle Cloud Infrastructure Streaming 
Package Description
com.oracle.bmc.streaming  
com.oracle.bmc.streaming.model  
com.oracle.bmc.streaming.requests  
com.oracle.bmc.streaming.responses  
Oracle Cloud Infrastructure Monitoring 
Package Description
com.oracle.bmc.monitoring  
com.oracle.bmc.monitoring.model  
com.oracle.bmc.monitoring.requests  
com.oracle.bmc.monitoring.responses  
Oracle Cloud Infrastructure Resource Manager 
Package Description
com.oracle.bmc.resourcemanager  
com.oracle.bmc.resourcemanager.model  
com.oracle.bmc.resourcemanager.requests  
com.oracle.bmc.resourcemanager.responses  
Oracle Cloud Infrastructure Ons 
Package Description
com.oracle.bmc.ons  
com.oracle.bmc.ons.model  
com.oracle.bmc.ons.requests  
com.oracle.bmc.ons.responses  
Oracle Cloud Infrastructure Autoscaling 
Package Description
com.oracle.bmc.autoscaling  
com.oracle.bmc.autoscaling.model  
com.oracle.bmc.autoscaling.requests  
com.oracle.bmc.autoscaling.responses  
Oracle Cloud Infrastructure Budget 
Package Description
com.oracle.bmc.budget  
com.oracle.bmc.budget.model  
com.oracle.bmc.budget.requests  
com.oracle.bmc.budget.responses  
Oracle Cloud Infrastructure Work Requests 
Package Description
com.oracle.bmc.workrequests  
com.oracle.bmc.workrequests.model  
com.oracle.bmc.workrequests.requests  
com.oracle.bmc.workrequests.responses  
Oracle Cloud Infrastructure Limits 
Package Description
com.oracle.bmc.limits  
com.oracle.bmc.limits.model  
com.oracle.bmc.limits.requests  
com.oracle.bmc.limits.responses  
Oracle Cloud Infrastructure Functions 
Package Description
com.oracle.bmc.functions  
com.oracle.bmc.functions.model  
com.oracle.bmc.functions.requests  
com.oracle.bmc.functions.responses  
Oracle Cloud Infrastructure Events 
Package Description
com.oracle.bmc.events  
com.oracle.bmc.events.model  
com.oracle.bmc.events.requests  
com.oracle.bmc.events.responses  
Oracle Cloud Infrastructure Dts 
Package Description
com.oracle.bmc.dts  
com.oracle.bmc.dts.model  
com.oracle.bmc.dts.requests  
com.oracle.bmc.dts.responses  
Oracle Cloud Infrastructure Oce 
Package Description
com.oracle.bmc.oce  
com.oracle.bmc.oce.model  
com.oracle.bmc.oce.requests  
com.oracle.bmc.oce.responses  
Oracle Cloud Infrastructure Oda 
Package Description
com.oracle.bmc.oda  
com.oracle.bmc.oda.model  
com.oracle.bmc.oda.requests  
com.oracle.bmc.oda.responses  
Oracle Cloud Infrastructure Analytics 
Package Description
com.oracle.bmc.analytics  
com.oracle.bmc.analytics.model  
com.oracle.bmc.analytics.requests  
com.oracle.bmc.analytics.responses  
Oracle Cloud Infrastructure Integration 
Package Description
com.oracle.bmc.integration  
com.oracle.bmc.integration.model  
com.oracle.bmc.integration.requests  
com.oracle.bmc.integration.responses  
Oracle Cloud Infrastructure Os Management 
Package Description
com.oracle.bmc.osmanagement  
com.oracle.bmc.osmanagement.model  
com.oracle.bmc.osmanagement.requests  
com.oracle.bmc.osmanagement.responses  
Oracle Cloud Infrastructure Marketplace 
Package Description
com.oracle.bmc.marketplace  
com.oracle.bmc.marketplace.model  
com.oracle.bmc.marketplace.requests  
com.oracle.bmc.marketplace.responses  
Oracle Cloud Infrastructure Apigateway 
Package Description
com.oracle.bmc.apigateway  
com.oracle.bmc.apigateway.model  
com.oracle.bmc.apigateway.requests  
com.oracle.bmc.apigateway.responses  
Oracle Cloud Infrastructure Application Migration 
Package Description
com.oracle.bmc.applicationmigration  
com.oracle.bmc.applicationmigration.model  
com.oracle.bmc.applicationmigration.requests  
com.oracle.bmc.applicationmigration.responses  
Oracle Cloud Infrastructure Data Catalog 
Package Description
com.oracle.bmc.datacatalog  
com.oracle.bmc.datacatalog.model  
com.oracle.bmc.datacatalog.requests  
com.oracle.bmc.datacatalog.responses  
Oracle Cloud Infrastructure Data Flow 
Package Description
com.oracle.bmc.dataflow  
com.oracle.bmc.dataflow.model  
com.oracle.bmc.dataflow.requests  
com.oracle.bmc.dataflow.responses  
Oracle Cloud Infrastructure Data Science 
Package Description
com.oracle.bmc.datascience  
com.oracle.bmc.datascience.model  
com.oracle.bmc.datascience.requests  
com.oracle.bmc.datascience.responses  
Oracle Cloud Infrastructure Nosql 
Package Description
com.oracle.bmc.nosql  
com.oracle.bmc.nosql.model  
com.oracle.bmc.nosql.requests  
com.oracle.bmc.nosql.responses  
Oracle Cloud Infrastructure Secrets 
Package Description
com.oracle.bmc.secrets  
com.oracle.bmc.secrets.model  
com.oracle.bmc.secrets.requests  
com.oracle.bmc.secrets.responses  
Oracle Cloud Infrastructure Vault 
Package Description
com.oracle.bmc.vault  
com.oracle.bmc.vault.model  
com.oracle.bmc.vault.requests  
com.oracle.bmc.vault.responses  
Oracle Cloud Infrastructure Bds 
Package Description
com.oracle.bmc.bds  
com.oracle.bmc.bds.model  
com.oracle.bmc.bds.requests  
com.oracle.bmc.bds.responses  
Oracle Cloud Infrastructure Cims 
Package Description
com.oracle.bmc.cims  
com.oracle.bmc.cims.model  
com.oracle.bmc.cims.requests  
com.oracle.bmc.cims.responses  
Oracle Cloud Infrastructure Data Safe 
Package Description
com.oracle.bmc.datasafe  
com.oracle.bmc.datasafe.model  
com.oracle.bmc.datasafe.requests  
com.oracle.bmc.datasafe.responses  
Oracle Cloud Infrastructure Mysql 
Package Description
com.oracle.bmc.mysql  
com.oracle.bmc.mysql.model  
com.oracle.bmc.mysql.requests  
com.oracle.bmc.mysql.responses  
Oracle Cloud Infrastructure Data Integration 
Package Description
com.oracle.bmc.dataintegration  
com.oracle.bmc.dataintegration.model  
com.oracle.bmc.dataintegration.requests  
com.oracle.bmc.dataintegration.responses  
Oracle Cloud Infrastructure Ocvp 
Package Description
com.oracle.bmc.ocvp  
com.oracle.bmc.ocvp.model  
com.oracle.bmc.ocvp.requests  
com.oracle.bmc.ocvp.responses  
Oracle Cloud Infrastructure Usage Api 
Package Description
com.oracle.bmc.usageapi  
com.oracle.bmc.usageapi.model  
com.oracle.bmc.usageapi.requests  
com.oracle.bmc.usageapi.responses  

Quick Start Guide

<h2>User Documentation</h2>
<p>More complete user documentation is available on the <a href="https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm">Oracle Cloud Infrastructure documentation portal</a>.

<h2 id="bmc-config">Configuring the SDK</h2>
<p>The SDK services need two types of configuration: credentials and client-side HTTP options.</p>

<h3>Configuring Credentials</h3>
<p>First, you need to create set up your credentials and config file. For instructions, see <a href="https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm">SDK and Tool Configuration</a> in the User Guide.</p>

<p>Next you need to set up the client to use the credentials. The credentials are abstracted through an <code>AuthenticationDetailsProvider</code> interface. Clients can implement this however you choose. 
There are numerous classes provided that help build an implementation for this provider, but for simplicity, assuming you have configured a credentials file under the 'DEFAULT' profile in the default location, you can do:</p>

<pre><code>AuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider(null);</code></pre>

<h3>Configuring Client-side HTTP Options</h3>
<p>Create a client-side configuration through the <code>ClientConfiguration</code> class. If you do not provide your own configuration, the Java SDK uses a default configuration. To provide your own configuration, use the following:</p>

<pre><code>ClientConfiguration clientConfig = ClientConfiguration.builder()
.connectionTimeoutMillis(3000)
.readTimeoutMillis(60000)
.build();</code></pre>

<p>Note that a service instance cannot be used to communicate with different regions. If you need to make requests to different regions, create multiple service instances.</p>

<h2>Instantiating Service Clients</h2>
<p>Now that you have configured a credentials provider and client configuration, a service client may be instantiated:

<pre><code>ObjectStorage client = new ObjectStorageClient(provider, clientConfig);</code></pre>

<h2>Setting the Endpoints</h2>
<p>Service endpoints can be set in one of two ways.</p>

<ul>
  <li>Call <code>setEndpoint()</code> on the service instance. This lets you to specify a full host name (for example, https://www.example.com).</li>        
  <li>Call <code>setRegion()</code> on the service instance. This selects the appropriate hostname for the service for the given region.</li>
</ul>

<p>Ex, using the previously constructed client:
<pre><code>client.setRegion(Region.US_PHOENIX_1);</code></pre>
Skip navigation links

Copyright © 2016–2020. All rights reserved.