Questions tagged [oci-java-sdk]

Oracle Cloud infrastructure is an infrastructure cloud computing service offered by Oracle Corporation.By using Java SDK you can install, configure Oracle Cloud Infrastructure.Use this tag for questions referring to the oci or Java platform sdk.

Useful Resources:

Related Tags:

44 questions
3
votes
1 answer

Getting the URL for a bucket or an object using oci-java-sdk

I have already a code to retrieve the objects in the bucket using oci-java-sdk and this is working as expected. I would like to retrieve the URL of the file which was uploaded to the bucket in object storage and when I use this URL, this should…
2
votes
1 answer

Error in creating secret: com.oracle.bmc.model.BmcException: (400, InvalidParameter, false) stage must be one of CURRENT

I am trying to create secret using oci java sdk using this: https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/2.8.0/vault/CreateSecretExample.java.html But getting this error: Exception in thread "main" com.oracle.bmc.model.BmcException:…
Arjun
  • 6,501
  • 10
  • 32
  • 34
2
votes
1 answer
2
votes
1 answer

What is the REST API for listing all the compartments in Oracle Cloud Infrastructure?

I need to fetch all the instances (authorized) in the tenancy. In Oracle Cloud documentation, I have seen fetching the instances by compartment ID(ListInstances API). So in order to fetch all instances, I need all the compartments. Any inputs? Or Is…
karthik_varma_k
  • 353
  • 4
  • 26
2
votes
1 answer

Can't create instance from java sdk

I am trying to create an OCI instance with the Java SDK. I am getting an error in routeRules. When I commented the following line, I was able to create an instance. But in that machines route is not enabled. addInternetGatewayToRouteTable(vcnClient,…
Shivin
  • 33
  • 3
2
votes
1 answer

Exception in thread "main" java.lang.IllegalArgumentException: java.io.IOException Invalid DER: length field too big (186)

I am using REST API's for monitoring Oracle Cloud Compute VM. String privateKeyFilename = "/.oci/oci_api_key.pem"; PrivateKey privateKey = loadPrivateKey(privateKeyFilename); RequestSigner signer = new RequestSigner(apiKey,…
2
votes
1 answer

oci java sdk via proxy

The Proxy connection area in this page points to an example page which results in a 404. https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/javasdk.htm page resulting in…
emc2_ehv
  • 21
  • 2
1
vote
0 answers

Facing a Client instance has been closed issue when using InstancePrincipalsLoginModule

I am attempting to use OCI Instance Principal authorization with Kafka Producer API to produce message to a OCI streams endpoint. I am referring to the documentation provided here -…
Abhiram
  • 11
  • 2
1
vote
1 answer

Upload a MultipartFile to a Oracle ObjectStorage

I have a Rest enpoint that accept a list of MultipartFile like this: @CrossOrigin(origins = "*", methods = {RequestMethod.POST}) @PostMapping(value = "/files", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces =…
1
vote
1 answer

Bulk upload and download using OCI Java SDK

I've gone through example here for single file upload and download. https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/UploadObjectExample.java However, I'm not finding any java OCI API for bulk upload/download of…
1
vote
1 answer

Exception in thread "main" com.oracle.bmc.model.BmcException: (404, NamespaceNotFound, false)

I executed the OCI sample program ObjectStorageGetBucketExample.java and was able to create the bucket and add the file. But, when I ran the ObjectStorageAsyncExample.java and ObjectStorageSyncExample.java to list the bucket. I got the following…
Johnny
  • 95
  • 7
1
vote
1 answer

Exception in thread "main" com.oracle.bmc.model.BmcException: (400, InvalidParameter, false) token recognition error at: ':'

SummarizeMetricsData final String compartment = "ocid1.compartment.oc1..aaaaaaaao6rwmdqqv5264k2hfnlvzlridxj2mhtz3mzycq526bybtxuiyygq"; final String namespace = "oci_computeagent"; final String query =…
karthik_varma_k
  • 353
  • 4
  • 26
1
vote
0 answers

How to read .pem file with a passphrase in Oracle Cloud Infrastructure?

I need to monitor Oracle Cloud Compute VM using REST API. I found the following lines of code for Signing with headers in Oracle documentation. String privateKeyFilename = "/.oci/oci_api_key.pem"; PrivateKey privateKey =…
karthik_varma_k
  • 353
  • 4
  • 26
1
vote
2 answers

How to create a configuration file for monitoring Oracle Cloud Compute VM?

I have seen the below lines in oracle cloud documentation. ConfigFile config = ConfigFileReader.parse("~/.oci/config"); ConfigFile configWithProfile = ConfigFileReader.parse("~/.oci/config", "DEFAULT"); Is 'config' a folder or a file? If it is a…
karthik_varma_k
  • 353
  • 4
  • 26
1
vote
1 answer

For REST API monitoring in Oracle Cloud Compute VM, do we need to install the Oracle Cloud Agent?

I need to monitor the Oracle Cloud Compute VM using REST API's or Java SDK. So for REST API monitoring do we need to do any set up in VM?
karthik_varma_k
  • 353
  • 4
  • 26
1
2 3