This repository contains a Solution with two projects:
- ovh-sharp (
netstandard1.6
) - ovh-cli (
netcoreapp1.1
)
This is a .NET Standard library project written in C# to wrap the OVH API for .NET Standard. This was originally developed in 2017, as there was no .NET library available to interface with the OVH API.
This is a .NET Core Console Application to actually work with the OVH API via CLI by using the ovh-sharp Library.
To build the library and the Client, use the build script with the appropriate task/target, which is written using Cake, using the build script bootstrapper for PowerShell. You can get a list of targets by executing the bootstrapper without arguments (first time launch will take a while because it needs to download build tool dependencies):
<REPO-ROOT>: .\build.ps1
- Account with OVH
- Set up OVH API access (see OVH API documentation), which yields these three keys:
- Application Secret
- Application Key
- Consumer Key
- .NET Core 1.1 (with SDK). You should use this LTS release.
Once you have the keys/secrets from OVH, you need to decide how you want to use them. You have two options:
- Set environment variables (preferred). The application will look for the following environment variables:
OVH_API_APPLICATION_KEY
OVH_API_APPLICATION_SECRET
OVH_API_CONSUMER_KEY
- Set them as command line parameters on each use (discouraged because it will be logged to the console history):
--ovh-application-key
--ovh-application-secret
--ovh-consumer-key
In the client's directory (<REPO-ROOT>/src/ovh-cli
) run the program with the --help
option:
dotnet run -- --help
You can run all sub-commands with the --help
option to get further help on that command, e.g. dotnet run -- create-cname --help
dotnet run -- create-cname -z example.com -s sub-domain-name -t actual-host.example.net.
dotnet run -- show-records example.com CNAME %search_string%
dotnet run -- delete-record example.com 1337
dotnet run -- clean-cnames --zone example.com --targetStartsWith "foo"
Please read CONTRIBUTING.md
This project was originally developed at RE'FLEKT.
All code and other resources in this repository are licensed under the MIT License