Installing and Configuring OSC CLI

You can manage your resources on the OUTSCALE Cloud using OSC CLI, a command-line interface (CLI) developed by 3DS OUTSCALE.

OSC CLI is compatible with the OUTSCALE API and all our AWS-compliant APIs.

You can also use Cockpit or AWS CLI. For more information, see About Cockpit and Installing and Configuring AWS CLI.

Installing OSC CLI

Before you begin: Make sure Python 3.5 or later and pip3 are installed on your machine.

  1. To install OSC CLI from the official PyPI package, launch the following command in your terminal:

    $ pip3 install --user osc-sdk
  2. Update your PATH environment variable:

    $ export PATH=$HOME/.local/bin/:$PATH

Configuring OSC CLI

  1. In your home directory, create a directory named .osc_sdk.

  2. In .osc_sdk, create a file named config.json with the following content:

    {
        "default": {
            "access_key": "ACCESSKEY",
            "secret_key": "SECRETKEY",
            "host": "outscale.com",
            "https": true,
            "method": "POST",
            "region_name": "eu-west-2"
        }
    }
  3. If necessary, replace eu-west-2 with the Region of your account.

  4. Also replace ACCESSKEY and SECRETKEY with the access key ID and corresponding secret key of your account.

    With Cockpit, you can find your access key ID and corresponding secret key using the following steps:

    1. Hover over your name.

    2. Click Personal information & Access keys > Access keys.

    3. Type your password.

    If you do not have access to Cockpit, you can get them using the following steps:

    1. Save the above file.

    2. Run the following command while replacing EMAIL and PASSWORD with the email and password of your OUTSCALE account:

      $ osc-cli icu ListAccessKeys --authentication-method password --login EMAIL --password PASSWORD

    You can now execute API calls using OSC CLI.

Using OSC CLI

To send a request using OSC CLI, specify in your command:

  • One of the supported APIs (api for the OUTSCALE API, or fcu, lbu, eim, icu or directlink).

  • The call you request.

  • Any other attribute required by the command.

Request sample
$ osc-cli api CreateVolume \
   --SubregionName eu-west-2a \
   --Size 10

If you need to pass a numeral string instead of an integer (for example: "12345678" with the quotes as part of the string), you must wrap your string in additional quotes ('"12345678"').

Related Pages

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.