Scaleway SDK

Scaleway SDK for Java

License

License

GroupId

GroupId

com.github.segator
ArtifactId

ArtifactId

scaleway-sdk
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Scaleway SDK
Scaleway SDK for Java
Project URL

Project URL

https://github.com/segator/scaleway-sdk
Source Code Management

Source Code Management

https://github.com/segator/scaleway-sdk

Download scaleway-sdk

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.httpcomponents : httpclient jar 4.5.2
com.fasterxml.jackson.core : jackson-databind jar 2.9.8
org.apache.commons : commons-io jar 1.3.2

Project Modules

There are no modules declared in this project.

scaleway-sdk

Java SDK for Scaleway Cloud computing

Status

Build Status License Code Coverage

Maven dependency

<dependency>
    <groupId>com.github.segator</groupId>
    <artifactId>scaleway-sdk</artifactId>
    <version>0.1-SNAPSHOT</version>
</dependency>
//Initialize Client on PARIS-1 zone
ScalewayClient scaleClientParis = ScalewayFactory.getScalewayClient(accessKey, orgKey,ScalewayComputeRegion.PARIS1);

//Get all My Servers
List<ScalewayServer> allMyServers =scaleClientParis.getAllServers();

//Get All the Images 
List<ScalewayImage> allTheImages = scaleClientParis.getAllImages();

//Create Server Instance using a Image by his Id
ScalewayImage xenialImage = scaleClientParis.getImage("75c28f52-6c64-40fc-bb31-f53ca9d02de9");//ubuntu xenial 16.04
ScalewayServer server = scaleClientParis.createBasicServer("myTest", xenialImage, ScalewayCommercialType.C2S, "tag1", "tag2");

//Get Organization & User Info
List<ScalewayOrganization> organizations = scaleClientParis.getAllOrganizations();


//Add new SSH key to an User
ScalewayUserKeyDefinition ssh = new ScalewayUserKey("ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAtIiDxn8RtE1tZLXfv........");

//Execute Task to an a Server Async,The task is executed in background
ScalewayServerTask taskInBackground = scaleClientParis.executeServerAction(server, ScalewayServerAction.POWER_ON)
//Execute Task to an a Server Sync, The thread is blocked until the task done
ScalewayServerTask taskResult = scaleClientParis.executeServerActionSync(server, ScalewayServerAction.POWER_ON)

 
scaleClientParis.addSSHKey(userID, ssh);

Versions

Version
0.0.2