which class can be used to create a always free Autonomous database processing instance via the OCI Java Sdk - oci-java-sdk

I plan to use the Oci java Sdk to create an always free ATP instance in the Oracle OCI environment.
Check with the examples bundled with oci java sdk and API. It lack details for the Always free ATP docs.
like to know
which class can be used?
ssh public key required? as from web console, not necessary to give the SSH public key during the creation procedure
which database edition can be used for Always free?
are the Always free ATP example available?
Thank you so much.

If you check:
https://docs.cloud.oracle.com/en-us/iaas/tools/java/1.12.1/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.Builder.html
The only required parameter to create free is: isFreeTier.
Edition and ssh-public-key is not applicable here.

Related

Oracle Cloud Infrastructure Authentication Error

I am trying to execute the Oracle cloud infrastructure rest API's from the postman application I have followed their document and made the setup but I am getting authentication errors. I need some information regarding the OCI herders.
You can go quickly to https://www.postman.com/oracledevs/workspace/oracle-cloud-infrastructure-rest-apis/overview, fork the API you want, and start using it.
No need for complex manual steps.
For the credentials, Fork the "OCI Credentials" and input your data, as shown here:
Oracle Cloud Infrastructure credentials for Postman
Please refer to below post for details.
https://redthunder.blog/2019/07/10/calling-oci-apis-from-postman/
In short, you need to create public/private key pair and upload public key to OCI via console. and use private key on your client (Postman) to authenticate your requests.

How to implement retry strategy in Oracle Cloud Infrastructure (OCI) using CLI tool?

I am interacting with Oracle Cloud (OCI) using OCI CLI (Command Line Interface), but I dont know how to implement a retry strategy for making api calls.
I know how to build a custom retry strategy using oci sdk for python. I am attaching the command reference for oci cli oci cli reference Please help

how to run a Initialization Script to create vm in the oracle oci java sdk

In the Oracle OCI web console, when you try to create a new compute instance, the console allows you to upload a Initialization Script to run some of the setup command automatically.
how to achieve the same benefit from the oci java sdk?
When you create an OCI VM, you can set its metadata to include an initialization script. Take a look at the example on how to set instance metadata as part of instance launch here. To specify an initialization script as part of the metadata, you'll want to set the key user_data in the metadata, with the value described as mentioned here (see "user_data" section).

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?
No, you don't need any set up inside the VM, but you do need the API users to be authorized in a IAM policy.
For example with a policy like this (for just reading the metrics):
Allow group <api_users> to read metrics in tenancy
Then you can use the APIs here.

Does Google discourage use of 3rd party Go drivers for cloud sql using?

According to this
There is a Go library for Cloud SQL.
Google Cloud SQL on App Engine:
user#cloudsql(project-id:instance-name)/dbname
But according the GAE site, you can (maybe should?) use only java or python to connect to Cloud SQL: https://developers.google.com/cloud-sql/faq#languages
Can I use languages other than Java or Python?
Only Java and Python are supported for Google Cloud SQL.
I'm determining if GAE is a good fit for my Go application. Is Google discouraging the use of 3rd party libraries to connect to Cloud SQL?
Not being able to use Cloud SQL would be a deal breaker for me and will have me looking for another platform to host my Go application.
Using Google Cloud SQL with App Engine Go SDK
This document describes how to use Google Cloud SQL instances with the
App Engine Go SDK.
Cloud SQL with Go-MySQL-Driver
We would like to add support for Cloud SQL to
github.com/go-sql-driver/mysql.
There shouldn't be much to do. The appengine/cloudsql package 1
provides a Dial function that takes a CloudSQL instance name and
returns a net.Conn; you just have to arrange for your mysql driver to
call that (or have some way of taking a net.Conn).
You could follow what we did for ziutek's mymysql package 2.
Why do you think you have will have a problem?
I belive you can use 3rd packages, here is the document in Go specific App Engine API:
https://developers.google.com/appengine/docs/go/cloud-sql/reference
Applications should use this package through database/sql: Select a
pure Go MySQL driver that supports this package, and use sql.Open with
protocol "cloudsql" and an address of the CloudSQL instance. The exact
format of the second argument to sql.Open is driver-dependent; consult
the driver's documentation for details.
import "database/sql"
import _ "<some mysql package>"
So I think "" can be https://github.com/go-sql-driver/mysql