Skip to content

aliyun-beta/aliyun-jclouds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Providers of JClouds for Aliyun

Build Status Maven Central

Introduction

aliyun-jclouds adapt for jclouds to use cloud service of aliyun

Providers

Provider Service
aliyun-ecs ComputeService
aliyun-oss BlobStore
aliyun-slb LoadBalancerService

Maven

<dependencies>
  <dependency>
    <groupId>io.github.aliyun-beta</groupId>
    <artifactId>aliyun-ecs</artifactId>
    <version>1.0.0</version>
  </dependency>
  <dependency>
    <groupId>io.github.aliyun-beta</groupId>
    <artifactId>aliyun-oss</artifactId>
    <version>1.0.0</version>
  </dependency>
  <dependency>
    <groupId>io.github.aliyun-beta</groupId>
    <artifactId>aliyun-slb</artifactId>
    <version>1.0.0</version>
  </dependency>
</dependencies>

Usage

Offical documents link Apache-jclouds

ComputeService
ComputeService computeService;
String provider = "aliyun-ecs";
String key = "Your AccessKey";
String secret = "Your AccessKeySecret";
ComputeServiceContext context = ContextBuilder
      .newBuilder(provider)
      .credentials(key, secret)
      .buildView(ComputeServiceContext.class);
computeService = context.getComputeService();
BlobStore
BlobStore blobStore;
String provider = "aliyun-oss";
String key = "Your AccessKey";
String secret = "Your AccessKeySecret";
BlobStoreContext context = ContextBuilder
      .newBuilder(provider)
      .credentials(key, secret)
      .buildView(BlobStoreContext.class);
blobStore = context.getBlobStore();
LoadBalancerService
LoadBalancerService loadBalancerService;
String provider = "aliyun-slb";
String key = "Your AccessKey";
String secret = "Your AccessKeySecret";
LoadBalancerServiceContext context = ContextBuilder
      .newBuilder(provider)
      .credentials(key, secret)
      .buildView(LoadBalancerServiceContext.class);
loadBalancerService = context.getLoadBalancerService();

Build

mvn package -DskipTests

License

Licensed under the Apache License, Version 2.0