Skip navigation links

Oracle Cloud Infrastructure Java SDK - 1.7.0

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.common  
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  

Quick Start Guide

User Documentation

More complete user documentation is available on the Oracle Cloud Infrastructure documentation portal.

Configuring the SDK

The SDK services need two types of configuration: credentials and client-side HTTP options.

Configuring Credentials

First, you need to create set up your credentials and config file. For instructions, see SDK and Tool Configuration in the User Guide.

Next you need to set up the client to use the credentials. The credentials are abstracted through an AuthenticationDetailsProvider 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:

AuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider(null);

Configuring Client-side HTTP Options

Create a client-side configuration through the ClientConfiguration class. If you do not provide your own configuration, the Java SDK uses a default configuration. To provide your own configuration, use the following:

ClientConfiguration clientConfig = ClientConfiguration.builder()
    .connectionTimeoutMillis(3000)
    .readTimeoutMillis(60000)
    .build();

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.

Instantiating Service Clients

Now that you have configured a credentials provider and client configuration, a service client may be instantiated:

ObjectStorage client = new ObjectStorageClient(provider, clientConfig);

Setting the Endpoints

Service endpoints can be set in one of two ways.

Ex, using the previously constructed client:

client.setRegion(Region.US_PHOENIX_1);
Skip navigation links

Copyright © 2016–2019. All rights reserved.