OVH SDK For Java

DESC.

Лицензия

Лицензия

Категории

Категории

IDE Инструменты разработки Java Языки программирования Сеть
Группа

Группа

net.minidev
Идентификатор

Идентификатор

ovh-java-sdk
Последняя версия

Последняя версия

1.0.17
Дата

Дата

Тип

Тип

jar
Описание

Описание

OVH SDK For Java
DESC.
Ссылка на сайт

Ссылка на сайт

https://github.com/UrielCh/ovh-java-sdk

Скачать ovh-java-sdk

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.minidev/ovh-java-sdk/ -->
<dependency>
    <groupId>net.minidev</groupId>
    <artifactId>ovh-java-sdk</artifactId>
    <version>1.0.17</version>
</dependency>
// https://jarcasting.com/artifacts/net.minidev/ovh-java-sdk/
implementation 'net.minidev:ovh-java-sdk:1.0.17'
// https://jarcasting.com/artifacts/net.minidev/ovh-java-sdk/
implementation ("net.minidev:ovh-java-sdk:1.0.17")
'net.minidev:ovh-java-sdk:jar:1.0.17'
<dependency org="net.minidev" name="ovh-java-sdk" rev="1.0.17">
  <artifact name="ovh-java-sdk" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.minidev', module='ovh-java-sdk', version='1.0.17')
)
libraryDependencies += "net.minidev" % "ovh-java-sdk" % "1.0.17"
[net.minidev/ovh-java-sdk "1.0.17"]

Зависимости

compile (75)

Идентификатор библиотеки Тип Версия
net.minidev : ovh-java-sdk-allDom Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-core Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-caascontainers Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-caasregistry Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-cdndedicated Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-cdnwebsite Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-cdnwebstorage Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-cloud Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-clusterhadoop Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-connectivity Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-contact Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dbaaslogs Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dbaasqueue Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dbaastimeseries Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dedicatedceph Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dedicatedhousing Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dedicatedinstallationTemplate Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dedicatednas Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dedicatednasha Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dedicatedserver Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-dedicatedCloud Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-deskaas Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-distributionimage Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-domain Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-emaildomain Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-emailexchange Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-emailpro Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-freefax Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-horizonView Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-hostingprivateDatabase Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-hostingreseller Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-hostingweb Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-hpcspot Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-ip Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-ipLoadbalancing Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-kube Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licensecloudLinux Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licensecpanel Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licensedirectadmin Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licenseoffice Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licenseplesk Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licensesqlserver Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licensevirtuozzo Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licensewindows Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-licenseworklight Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-me Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-metrics Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-msServices Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-newAccount Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-order Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-overTheBox Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-paastimeseries Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-packsiptrunk Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-packxdsl Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-partners Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-price Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-router Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-saascsp2 Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-secret Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-service Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-sms Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-ssl Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-sslGateway Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-stackmis Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-status Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-store Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-supplymondialRelay Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-support Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-telephony Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-veeamveeamEnterprise Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-veeamCloudConnect Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-vip Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-vps Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-vrack Необязательный jar 1.0.17
net.minidev : ovh-java-sdk-xdsl Необязательный jar 1.0.17

Модули Проекта

Данный проект не имеет модулей.

OVH logo

Ovh-java-sdk

Build Status Maven Central

Project on-hold

Since every change from OVH API can break any existing code using this api, I prefert to give up this java wrapper. I have switch to typescript I'm converting all my existing code to use api-ovh-node

A lot's of sample code are available here

With this new api far is way more easy to read.


usage

The complete java SDK for OVH services.

Each service had his own java SDK. you can use each service independently:

<dependency>
	<groupId>net.minidev</groupId>
	<artifactId>ovh-java-sdk-domain</artifactId>
	<version>1.0.17</version>
</dependency>
<dependency>
	<groupId>net.minidev</groupId>
	<artifactId>ovh-java-sdk-order</artifactId>
	<version>1.0.17</version>
</dependency>

Or you can load them all with a single dependency:

<dependency>
	<groupId>net.minidev</groupId>
	<artifactId>ovh-java-sdk</artifactId>
	<version>1.0.17</version>
</dependency>

But it's not recomended, excepted if you use them all.

Usage sample

Using the all in one SDK:

List all your domain with their expiration dates.

ApiOvh api = ApiOvh.getInstance(nic, password);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for (String serviceName : api.domain.GET(null)) {
    OvhService service = api.domain.serviceName_serviceInfos_GET(serviceName);
    System.out.printf("%s status:%s expire on:%s\n", serviceName,
    service.status.toString(), sdf.format(service.expiration));
}

by default you will get the following error:

[main] ERROR net.minidev.ovh.core.ApiOvhConfigBasic - No cert directory, can not save consumer_key! please set `consumer_key_storage` variable to a valid directory in your ./ovh.conf, ~/.ovh/config, ~/ovh.conf or /etc/ovh.conf, or in your environ variale OVH_CONSUMER_KEY_STORAGE
[main] ERROR net.minidev.ovh.core.ApiOvhConfigBasic - no applicationKey, using the defaut one create a key, and set `application_key` and `application_secret` variable in your ./ovh.conf, ~/.ovh/config, ~/ovh.conf or /etc/ovh.conf, or in your environ variales OVH_APPLICATION_KEY and OVH_APPLICATION_SECRET

because you need to configure your ovh access, but it will work.

Using ApiOvhDomain:

List all your domains with their expiration dates, only using ovh-java-sdk-domain dependence.

ApiOvhCore core = ApiOvhCore.getInstance(nic, password);
ApiOvhDomain api = new ApiOvhDomain(core);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for (String serviceName : api.GET(null)) {
    OvhService service = api.serviceName_serviceInfos_GET(serviceName);
    System.out.printf("%s status:%s expire on:%s\n", serviceName,
    service.status.toString(), sdf.format(service.expiration));
}

you get the same results.

Configuration file

The configuration is loaded from the following files in this order:

  1. ovh.conf in the current directory
  2. ~/.ovh/config
  3. ~/ovh.conf
  4. /etc/ovh.conf

the configuration file can contain those values:

  • endpoint entry point if you use a single endpoint
  • application_key your application key
  • application_secret your application secret
  • consumer_key your consumer key (CK) if you are using a single account
  • redirection the redirection linked to your application_key
  • consumer_key_storage a directory to store your CK in multi account mode.

Function naming

Java method has the same name that their REST URL, just replace special chars by _ and postfix the result by the uppercased http method example:

POST /telephony/{billingAccount}/conference/{serviceName}/participants/{id}/mute
GET  /telephony/{billingAccount}/abbreviatedNumber/{abbreviatedNumber}

will be named:

billingAccount_conference_serviceName_participants_id_mute_POST(billingAccount, serviceName, id, ...)
billingAccount_abbreviatedNumber_abbreviatedNumber_GET(billingAccount, abbreviatedNumber)

so that you can easily guest all the function names.

  • the namespace are removed form the method name.
  • using the main ApiOvh fron ovh-java-sdk this called is available through apiOvh.telephony.billingAccount_abbreviatedNumber_abbreviatedNumber_GET

Services:

All services are present excepted ovh-java-sdk-auth, that one is embedded in the main ovh-java-sdk-core artefact.

Authentication

You can use:

  • a user/password: in this case the API generates ConsumerKey on demand for TTL_IN_SEC, and renew them if needed. ApiOvhCore.getInstance("nic", "password", TTL_IN_SEC)
  • a ConsumerKey: provided by your code. ApiOvhCore.getInstance("My__consumer___key") (available in version 0.9.1)
  • a ConsumerKey: provided in your configuration, in this case you can only use a single account. ApiOvhCore.getInstance() (available in version 0.9.1)

About the API:

  • This api is the public version of the Api used to manage the biggest OVH customer resources.
  • The first version of our API had never been released for the sake of ovh. (We outaged OVH a couple of times with the previous version)
  • This api had been built to use multiple accounts in the same time.

Supported APIs

Try the official API api Ovh europe.

License

3-Clause BSD

Версии библиотеки

Версия
1.0.17
0.9.15
0.9.14
0.9.13
0.9.12
0.9.11
0.9.10
0.9.9
0.9.8
0.9.6
0.9.4
0.9.3
0.9.2
0.9.1
0.9