selvpcclient
The go-selvpcclient library and python-selvpcclient console client can be used to work with Cloud Management API and Quota Management API: projects, quotas, and other objects.
Install go-selvpcclient
The go-selvpcclient package contains the Go library.
You can view library usage examples in the selvpcclient documentation on pkg.go.dev.
-
Download the package:
go get github.com/selectel/go-selvpcclient/selvpcclient/v3 -
Create a service user for authentication.
Install python-selvpcclient
The python-selvpcclient package contains the selvpc CLI console client.
You can view selvpc CLI usage examples in the selvpcclient documentation on GitHub.
-
Set environment variables:
export SEL_TOKEN=<x_token>export SEL_URL=https://api.selectel.ru/vpc/resellexport SEL_API_VERSION=2export OS_AUTH_URL=https://cloud.api.selcloud.ru/identity/v3Specify:
<x_token>is the static token you obtained in step 1;OS_AUTH_URLis the address (URL) which depends on the region and pool; it can be found in the list of URLs.
-
Install Python 3 and virtualenv:
sudo apt updatesudo apt install python3 virtualenv -
Install pip3:
sudo apt install python3-pip -
Create a virtual environment for working with selvpcclient:
virtualenv env -
Activate the virtual environment:
source env/bin/activate -
Install the selvpcclient package:
pip install -U python-selvpcclient