################################################################################ Step1 : Setup CLI ( see output later) ################################################################################ 1) Get these values from Cloud Console first Tenancy ocid :ocid1.tenancy.oc1..aaaaaaaa736vp7irfcmw6hhjfqijsp5hsypt75pvxywuqn6ev24awlnnts4a User ocid :ocid1.user.oc1..aaaaaaaa7tww75ohhflxhczyuy6r6q777y2arjfpmpjhk7zgwttuh4rzwcra Region :us-ashburn-1 ################################################################################ Step2 : Install OCI-CLI ################################################################################ https://github.com/oracle/oci-cli/tree/90d694ff043b3757d365dcc9f5ed499d0e698b10 Open Windows Powershell and run this ----------------------------------------- powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))" test goto cmd prompt type oci --help ################################################################################ Step3 : Configure CLI ( see output later) ################################################################################ CMD> oci setup config Copy Public key generted from above config in the user in OCI Console test CMD> oci os ns get ################################################################################ OCI CLI Commands Web1: https://ruepprich.com/2018/07/16/oci-command-line-interface-cli-basics/ ################################################################################ -To list all the compartments in your tenancy use: oci iam compartment list --all -To list the available shapes for a compartment use oci compute image list --compartment-id ocid1.compartment.oc1..xyz oci iam compartment list oci network vcn list --compartment-id xxxx [ Note:Get the Compartment from oci iam compartment list] oci network security-list list --compartment-id xxxx --vcn-id YYYY [ Note: Get the vcn from oci network vcn list --compartment-id xxxx ] ################################################################################ Object Storage ################################################################################ https://docs.cloud.oracle.com/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/os/object/put.html #################### output ############################################ C:\WINDOWS\system32>oci setup config This command provides a walkthrough of creating a valid CLI config file. The following links explain where to find the information required by this script: User OCID and Tenancy OCID: https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#Other Region: https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm General config documentation: https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm Enter a location for your config [C:\Users\adarshkumar\.oci\config]: Enter a user OCID: ocid1.user.oc1..aaaaaaaa7tww75ohhflxhczyuy6r6q777y2arjfpmpjhk7zgwttuh4rzwcra Enter a tenancy OCID: ocid1.tenancy.oc1..aaaaaaaa736vp7irfcmw6hhjfqijsp5hsypt75pvxywuqn6ev24awlnnts4a Enter a region (e.g. ap-mumbai-1, ap-seoul-1, ap-sydney-1, ap-tokyo-1, ca-toronto-1, eu-frankfurt-1, eu-zurich-1, sa-saopaulo-1,uk-london-1, us-ashburn-1, us-gov-ashburn-1, us-gov-chicago-1, us-gov-phoenix-1, us-langley-1, us-luke-1, us-phoenix-1): us-ashburn-1 Do you want to generate a new RSA key pair? (If you decline you will be asked to supply the path to an existing key.) [Y/n]: y Enter a directory for your keys to be created [C:\Users\adarshkumar\.oci]: Enter a name for your key [oci_api_key]: Public key written to: C:\Users\adarshkumar\.oci\oci_api_key_public.pem Enter a passphrase for your private key (empty for no passphrase): Private key written to: C:\Users\adarshkumar\.oci\oci_api_key.pem Fingerprint: 14:6c:e2:3a:14:25:2c:5e:bf:82:71:f5:06:8d:8e:da Config written to C:\Users\adarshkumar\.oci\config If you haven't already uploaded your public key through the console, follow the instructions on the page linked below in the section 'How to upload the public key': https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#How2 ###################################################################################################