Configuring the Command Line Interface

Prior to running CLI commands, configure your connection to the Oracle Cloud.

Basic Configuration

  1. Run the setup command.
    psm setup
  2. When prompted, enter your cloud user name, password, and identity domain.

    For example:

    Username: myuser321
    Retype Password:
    Identity domain: MyIdentityDomain54321


    If you are configuring your CLI for use with Identity Cloud Service (IDCS), you need to enter your IDCS tenant name rather than your identity domain. The IDCS tenant name is usually a lengthy string of characters preceded by a service ID, for example, idcs-6********. To find your IDCS tenant name:
    1. From your My Services dashboard, click Identity Cloud.

    2. In the Service Instances section of the service page, hover over the Service Instance URL and copy the link location. The tenant name begins with the characters idcs- and then is followed by a string of numbers and letters, for example, idcs-6********

      Alternatively, the Oracle Identity Cloud Service tenant name appears in the browser URL when you click My Services to log in or if you click Open Admin Console from the Service Instances section.

  3. Enter your cloud data center region based on the REST API server that you identified earlier:
    • If your REST API server contains the text emea , enter emea.
    • If your REST API server contains the text aucom , enter aucom.
    • Otherwise accept the default value, us .

    For example:

    Region [us]: emea


    Only Oracle Cloud at Customer This topic applies only to Oracle Cloud at Customer.

    Using Oracle Cloud at Customer you must specify a URL to the Oracle Cloud at Customer machine ( a hostname instead of a region name.

  4. Enter your preferred output format or accept the default value:
    • short (this is the default); this output displays only a few important properties:
       Service:                    JCS1
       Status:                     Ready
       Edition:                    Enterprise Edition
       Compute Site:               N/A
       Cloud Storage Container:
       Created On:                 2018-02-21T17:43:02.955+0000
    • json; this output appears in a standard JSON format:
    • html ; this produces HTML that you can redirect to a file or copy and then paste to a file:

    For example:

    Output format [short]: json
  5. If you want to communicate with the PSM REST API over Oauth, at the Use OAuth? prompt type y.
    • If you select the default (n), communication between the CLI and the REST API will continue to use basic authorization.

    • If you select y, you will be further prompted for your OAuth credentials, specifically your Client ID and Client Secret (the Access Token Server is derived from the identity domain and the prompt is optional).

      To obtain the OAuth credentials see Obtaining and Using an OAuth Token for Platform Services

      Enter a URL (only if you are using a different server):
      Use OAuth? [n]: y
      Client ID: myPlatApp-ccact-xxxxxxxxxx_APPID
      Client Secret: def21eb7-xxxxxxxxxx-21c1234f08f5
      Access Token Server [default]:

After the CLI successfully connects to the Oracle Cloud, it will list the available services in this cloud account. For example:

'psm setup' was successful. Available services are:
  o JaaS : Oracle Java Cloud Service
  o accs : Oracle Application Container Cloud Service
  o dbcs : Oracle Database Cloud Service
  o elasticSearch : Oracle Elasticsearch Service
  o stack : Oracle Cloud Stack Manager


You can further customize the output level for all CLI commands with the log command. The default level is info.