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. |
-
To install OSC CLI from the official PyPI package, launch the following command in your terminal:
$ pip3 install --user osc-sdk
-
Update your PATH environment variable:
$ export PATH=$HOME/.local/bin/:$PATH
Configuring OSC CLI
-
In your home directory, create a directory named
.osc_sdk
. -
In
.osc_sdk
, create a file namedconfig.json
with the following content:{ "default": { "access_key": "ACCESSKEY", "secret_key": "SECRETKEY", "host": "outscale.com", "https": true, "method": "POST", "region_name": "eu-west-2" } }
-
If necessary, replace
eu-west-2
with the Region of your account. -
Also replace
ACCESSKEY
andSECRETKEY
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:
-
Hover over your name.
-
Click Personal information & Access keys > Access keys.
-
Type your password.
If you do not have access to Cockpit, you can get them using the following steps:
-
Save the above file.
-
Run the following command while replacing
EMAIL
andPASSWORD
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, orfcu
,lbu
,eim
,icu
ordirectlink
). -
The call you request.
-
Any other attribute required by the command.
$ osc-cli api CreateVolume \
--SubregionName eu-west-2a \
--Size 10
If you need to pass a numeral string instead of an integer (for example: |
Related Pages
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.