Oracle OCI CLI
OCI CLI is a command line interface (CLI) that allows users to perform operations on Oracle Cloud Infrastructure (OCI) service using commands. It allows operations related to resource management of cloud services, which are usually performed using a console on a web browser, to be executed as Linux commands. Therefore, it can be used to connect Genkai to cloud services, for example, by automatically performing a series of investigations using shell scripts.
Please note that the Genkai account contract does not include cloud service resources. the center does not accept requests for contracting cloud services on behalf of or using cloud services. ct the following for information on using OCI.
OCI Contact usModule
Module name | Version |
---|---|
ocicli | 3.42.0 |
Preparation
Creating an OCI aloud account and adding users
To use the OCI CLI, you must first create an OCI account and add an OCI user, which can be a free trial account or a paid account. See below for instructions on how to create an OCI account and add OCI users.
Obtaining information about OCI account
In OCI, OCI users perform resource management for environments called tenancies that are created for OCI accounts. Therefore, it is necessary to obtain this information and store it in Genkai when using Genkai's OCI CLI. Both tenancy information and OCI user information are expressed in the form of OCIDs. These OCIDs can be found on the following page.
Creation of OCI configuration file
Run the following command in Genkai, paste the above tenancy and OCID of the OCI user, and also create the authentication information called API key, and the configuration file necessary to use OCI CLI will be created in Genkai's home directory.
|
Registration of a public key
By registering the public key with OCI under the authentication information created when you create the configuration file described above, you can use the OCI CLI to manage OCI resources. To register the public key, first view the public key using the following command.
|
Then, register the public key information with OCI by referring to the following.
How to Upload the Public KeyRunning OCI CLI commands
Select a module
To start using the OCI CLI, log in to Genkai and select the ocicli module with the following command.
|
Run commands
The OCI CLI allows you to perform various operations on OCI by specifying OCI CLI command names for the oci
command.
The names of the OCI CLI commands that can be executed can be viewed below.
|
You can also browse the usage of each OCI CLI command by specifying -h
after each command.
For example, the following command will show you how to use the network
command.
|
Reference
Please see below for detailed instructions on using the OCI CLI.