Frontmatter
The Oracle docs for this (and more) are at https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm but I have tried to make the API key creation as simple as possible.
Create an API key
After logging in at the top right of the landing page you can see a generic user outline which you can click on to drop down a menu.
Select “My Profile”. In the next window select “API Keys” from the “Resources” menu on the left side of the screen.
Under “API keys” click the “Add API key” button. A slider sub-window will open from the right. Select “Download private key”. Don’t try to use your own SSH key as these must be in “pem” file format.
Depending on how your browser is configured, a file browser window will open allowing you to choose where to save the pem file. Select “Add” at the bottom of the slide-out window.
A pop-open window will open. Follow the instructions to create the “~/.oci/config” file.
With the above steps completed, you should now be able to follow the Oracle documentation QuickStart to install the OCI Command Line Interface (CLI) at https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#Quickstart but do not follow the instructions for “Setting up the Configuration File” as we have already completed that here. Finally, you can start with the CLI Getting Started doc at https://docs.oracle.com/en-us/iaas/Content/GSG/Tasks/gettingstartedwiththeCLI.htm but you should be able to run the following and get a JSON return.
$ oci os ns get
{
“data”: “<redacted>”
}
Leave a Reply