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

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

Related

which class can be used to create a always free Autonomous database processing instance via the 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.

Using Azure CLI to manage API Management (APIM) Users, Products, Certificates, APIs

It seems that this page contains all the functionality that Azure CLI supports in regard to Azure API Management. But it doesn't show how to manage entities such as users, products, certificates, subscriptions, and APIs using Azure CLI.
Does Azure CLI lack these functionalities or is there a way to manage those entities using Azure CLI? Can Azure CLI be considered as a replacement for ARM templates in the case of APIM?
Azure CLI is missing those. Please raise on aka.ms/apimwish
According to my research, the Azure CLI API management command is in preview. SO it will miss some commands. For more details, please refer to the document. So if you want to manage Azure API management entities such as users, products, certificates, subscriptions, and APIs, I suggest you use Azure PowerShell to do that : https://learn.microsoft.com/en-us/powershell/module/az.apimanagement/?view=azps-3.0.0.
The Azure CLI currently seems to support this, see here for Microsoft docs. Make sure you upgrade your CLI to the latest version to be able to leverage this.
To get the CLI docs:
az apim --help

Is there a way to programmatically configure azure EasyAuth for AAD for an Azure Function App?

I am writing Azure CLI scripts to automate creating cloud-side components in Microsoft Azure. In particular, I am using the CLI to create Azure Function Apps. However, while I am able to create a Function App using the CLI, I have not been able to identify a way to configure authentication against Azure Active Directory, other than by using the Azure Portal user interface (see https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad for a description of the interactive process).
It's clear that the interactive process performs several steps behind the scenes, including creating an AAD Application registration and associating the registration with the Function App. My questions are:
What are details of the steps performed?
Is there a programmatic way, either with the CLI or some other interface, to perform the same set of steps?
Easy Auth is actually a module on IIS. You can enable it using Azure CLI:
az webapp auth update -g myResourceGroup -n myUniqueApp --enabled true \
--action LoginWithAzureActiveDirectory \
--aad-allowed-token-audiences https://webapp_name.azurewebsites.net/.auth/login/aad/callback \
--aad-client-id ecbacb08-df8b-450d-82b3-3fced03f2b27 --aad-client-secret very_secret_password \
--aad-token-issuer-url https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7983a3e9c5a/
https://learn.microsoft.com/en-us/cli/azure/webapp/auth?view=azure-cli-latest#az_webapp_auth

Stackdriver logging for Java deployments in GCP compute engine

I have deployed my 2 java applications( ant and maven based) in gcp compute engine , i wish to connect those log files to GCP stackdriver logging .
Can any one help me on this out ?
You need to configure the logging agent, see here: https://cloud.google.com/logging/docs/agent/installation
You can use the stackdriver logging library for java: https://cloud.google.com/logging/docs/setup/java
That being said, if all you need to run is some java applications, it probably makes more sense to deploy them in appengine standard (or flex, depending on needs), where logging is configured out of the box.

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