Skip to content

outscale/osc-sdk-java

Repository files navigation

Project Incubating

osc-sdk-java

3DS OUTSCALE API

  • API version: 1.30.0

Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

You can learn more about errors returned by the API in the dedicated errors page.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are differences in resource names between AWS and the OUTSCALE API.
You can also manage your resources using the Cockpit web interface.

An OpenAPI description of the OUTSCALE API is also available in this GitHub repository.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>io.github.outscale</groupId>
  <artifactId>osc-sdk-java</artifactId>
  <version>0.8.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'osc-sdk-java' jar has been published to maven central.
    mavenLocal()       // Needed if the 'osc-sdk-java' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "io.github.outscale:osc-sdk-java:0.8.0"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/osc-sdk-java-0.8.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import io.github.outscale.osc_sdk_java.client.ApiClient;
import io.github.outscale.osc_sdk_java.client.ApiException;
import io.github.outscale.osc_sdk_java.client.Configuration;
import io.github.outscale.osc_sdk_java.client.auth.*;
import io.github.outscale.osc_sdk_java.client.models.*;
import io.github.outscale.osc_sdk_java.client.api.AccessKeyApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.eu-west-2.outscale.com/api/v1");
    
    // Configure API key authorization: ApiKeyAuthSec
    ApiKeyAuth ApiKeyAuthSec = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuthSec");
    ApiKeyAuthSec.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuthSec.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    AccessKeyApi apiInstance = new AccessKeyApi(defaultClient);
    CreateAccessKeyRequest createAccessKeyRequest = new CreateAccessKeyRequest(); // CreateAccessKeyRequest | 
    try {
      CreateAccessKeyResponse result = apiInstance.createAccessKey(createAccessKeyRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AccessKeyApi#createAccessKey");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://api.eu-west-2.outscale.com/api/v1

Class Method HTTP request Description
AccessKeyApi createAccessKey POST /CreateAccessKey
AccessKeyApi deleteAccessKey POST /DeleteAccessKey
AccessKeyApi readAccessKeys POST /ReadAccessKeys
AccessKeyApi readSecretAccessKey POST /ReadSecretAccessKey
AccessKeyApi updateAccessKey POST /UpdateAccessKey
AccountApi checkAuthentication POST /CheckAuthentication
AccountApi createAccount POST /CreateAccount
AccountApi readAccounts POST /ReadAccounts
AccountApi readConsumptionAccount POST /ReadConsumptionAccount
AccountApi resetAccountPassword POST /ResetAccountPassword
AccountApi sendResetPasswordEmail POST /SendResetPasswordEmail
AccountApi updateAccount POST /UpdateAccount
ApiAccessPolicyApi readApiAccessPolicy POST /ReadApiAccessPolicy
ApiAccessPolicyApi updateApiAccessPolicy POST /UpdateApiAccessPolicy
ApiAccessRuleApi createApiAccessRule POST /CreateApiAccessRule
ApiAccessRuleApi deleteApiAccessRule POST /DeleteApiAccessRule
ApiAccessRuleApi readApiAccessRules POST /ReadApiAccessRules
ApiAccessRuleApi updateApiAccessRule POST /UpdateApiAccessRule
ApiLogApi readApiLogs POST /ReadApiLogs
CaApi createCa POST /CreateCa
CaApi deleteCa POST /DeleteCa
CaApi readCas POST /ReadCas
CaApi updateCa POST /UpdateCa
CatalogApi readCatalog POST /ReadCatalog
ClientGatewayApi createClientGateway POST /CreateClientGateway
ClientGatewayApi deleteClientGateway POST /DeleteClientGateway
ClientGatewayApi readClientGateways POST /ReadClientGateways
DhcpOptionApi createDhcpOptions POST /CreateDhcpOptions
DhcpOptionApi deleteDhcpOptions POST /DeleteDhcpOptions
DhcpOptionApi readDhcpOptions POST /ReadDhcpOptions
DirectLinkApi createDirectLink POST /CreateDirectLink
DirectLinkApi deleteDirectLink POST /DeleteDirectLink
DirectLinkApi readDirectLinks POST /ReadDirectLinks
DirectLinkInterfaceApi createDirectLinkInterface POST /CreateDirectLinkInterface
DirectLinkInterfaceApi deleteDirectLinkInterface POST /DeleteDirectLinkInterface
DirectLinkInterfaceApi readDirectLinkInterfaces POST /ReadDirectLinkInterfaces
DirectLinkInterfaceApi updateDirectLinkInterface POST /UpdateDirectLinkInterface
FlexibleGpuApi createFlexibleGpu POST /CreateFlexibleGpu
FlexibleGpuApi deleteFlexibleGpu POST /DeleteFlexibleGpu
FlexibleGpuApi linkFlexibleGpu POST /LinkFlexibleGpu
FlexibleGpuApi readFlexibleGpuCatalog POST /ReadFlexibleGpuCatalog
FlexibleGpuApi readFlexibleGpus POST /ReadFlexibleGpus
FlexibleGpuApi unlinkFlexibleGpu POST /UnlinkFlexibleGpu
FlexibleGpuApi updateFlexibleGpu POST /UpdateFlexibleGpu
ImageApi createImage POST /CreateImage
ImageApi createImageExportTask POST /CreateImageExportTask
ImageApi deleteImage POST /DeleteImage
ImageApi readImageExportTasks POST /ReadImageExportTasks
ImageApi readImages POST /ReadImages
ImageApi updateImage POST /UpdateImage
InternetServiceApi createInternetService POST /CreateInternetService
InternetServiceApi deleteInternetService POST /DeleteInternetService
InternetServiceApi linkInternetService POST /LinkInternetService
InternetServiceApi readInternetServices POST /ReadInternetServices
InternetServiceApi unlinkInternetService POST /UnlinkInternetService
KeypairApi createKeypair POST /CreateKeypair
KeypairApi deleteKeypair POST /DeleteKeypair
KeypairApi readKeypairs POST /ReadKeypairs
ListenerApi createListenerRule POST /CreateListenerRule
ListenerApi createLoadBalancerListeners POST /CreateLoadBalancerListeners
ListenerApi deleteListenerRule POST /DeleteListenerRule
ListenerApi deleteLoadBalancerListeners POST /DeleteLoadBalancerListeners
ListenerApi readListenerRules POST /ReadListenerRules
ListenerApi updateListenerRule POST /UpdateListenerRule
LoadBalancerApi createLoadBalancer POST /CreateLoadBalancer
LoadBalancerApi createLoadBalancerTags POST /CreateLoadBalancerTags
LoadBalancerApi deleteLoadBalancer POST /DeleteLoadBalancer
LoadBalancerApi deleteLoadBalancerTags POST /DeleteLoadBalancerTags
LoadBalancerApi deregisterVmsInLoadBalancer POST /DeregisterVmsInLoadBalancer
LoadBalancerApi linkLoadBalancerBackendMachines POST /LinkLoadBalancerBackendMachines
LoadBalancerApi readLoadBalancerTags POST /ReadLoadBalancerTags
LoadBalancerApi readLoadBalancers POST /ReadLoadBalancers
LoadBalancerApi readVmsHealth POST /ReadVmsHealth
LoadBalancerApi registerVmsInLoadBalancer POST /RegisterVmsInLoadBalancer
LoadBalancerApi unlinkLoadBalancerBackendMachines POST /UnlinkLoadBalancerBackendMachines
LoadBalancerApi updateLoadBalancer POST /UpdateLoadBalancer
LoadBalancerPolicyApi createLoadBalancerPolicy POST /CreateLoadBalancerPolicy
LoadBalancerPolicyApi deleteLoadBalancerPolicy POST /DeleteLoadBalancerPolicy
LocationApi readLocations POST /ReadLocations
NatServiceApi createNatService POST /CreateNatService
NatServiceApi deleteNatService POST /DeleteNatService
NatServiceApi readNatServices POST /ReadNatServices
NetApi createNet POST /CreateNet
NetApi deleteNet POST /DeleteNet
NetApi readNets POST /ReadNets
NetApi updateNet POST /UpdateNet
NetAccessPointApi createNetAccessPoint POST /CreateNetAccessPoint
NetAccessPointApi deleteNetAccessPoint POST /DeleteNetAccessPoint
NetAccessPointApi readNetAccessPointServices POST /ReadNetAccessPointServices
NetAccessPointApi readNetAccessPoints POST /ReadNetAccessPoints
NetAccessPointApi updateNetAccessPoint POST /UpdateNetAccessPoint
NetPeeringApi acceptNetPeering POST /AcceptNetPeering
NetPeeringApi createNetPeering POST /CreateNetPeering
NetPeeringApi deleteNetPeering POST /DeleteNetPeering
NetPeeringApi readNetPeerings POST /ReadNetPeerings
NetPeeringApi rejectNetPeering POST /RejectNetPeering
NicApi createNic POST /CreateNic
NicApi deleteNic POST /DeleteNic
NicApi linkNic POST /LinkNic
NicApi linkPrivateIps POST /LinkPrivateIps
NicApi readNics POST /ReadNics
NicApi unlinkNic POST /UnlinkNic
NicApi unlinkPrivateIps POST /UnlinkPrivateIps
NicApi updateNic POST /UpdateNic
ProductTypeApi readProductTypes POST /ReadProductTypes
PublicCatalogApi readPublicCatalog POST /ReadPublicCatalog
PublicIpApi createPublicIp POST /CreatePublicIp
PublicIpApi deletePublicIp POST /DeletePublicIp
PublicIpApi linkPublicIp POST /LinkPublicIp
PublicIpApi readPublicIpRanges POST /ReadPublicIpRanges
PublicIpApi readPublicIps POST /ReadPublicIps
PublicIpApi unlinkPublicIp POST /UnlinkPublicIp
QuotaApi readQuotas POST /ReadQuotas
RegionApi readRegions POST /ReadRegions
RouteApi createRoute POST /CreateRoute
RouteApi deleteRoute POST /DeleteRoute
RouteApi updateRoute POST /UpdateRoute
RouteTableApi createRouteTable POST /CreateRouteTable
RouteTableApi deleteRouteTable POST /DeleteRouteTable
RouteTableApi linkRouteTable POST /LinkRouteTable
RouteTableApi readRouteTables POST /ReadRouteTables
RouteTableApi unlinkRouteTable POST /UnlinkRouteTable
SecurityGroupApi createSecurityGroup POST /CreateSecurityGroup
SecurityGroupApi deleteSecurityGroup POST /DeleteSecurityGroup
SecurityGroupApi readSecurityGroups POST /ReadSecurityGroups
SecurityGroupRuleApi createSecurityGroupRule POST /CreateSecurityGroupRule
SecurityGroupRuleApi deleteSecurityGroupRule POST /DeleteSecurityGroupRule
ServerCertificateApi createServerCertificate POST /CreateServerCertificate
ServerCertificateApi deleteServerCertificate POST /DeleteServerCertificate
ServerCertificateApi readServerCertificates POST /ReadServerCertificates
ServerCertificateApi updateServerCertificate POST /UpdateServerCertificate
SnapshotApi createSnapshot POST /CreateSnapshot
SnapshotApi createSnapshotExportTask POST /CreateSnapshotExportTask
SnapshotApi deleteSnapshot POST /DeleteSnapshot
SnapshotApi readSnapshotExportTasks POST /ReadSnapshotExportTasks
SnapshotApi readSnapshots POST /ReadSnapshots
SnapshotApi updateSnapshot POST /UpdateSnapshot
SubnetApi createSubnet POST /CreateSubnet
SubnetApi deleteSubnet POST /DeleteSubnet
SubnetApi readSubnets POST /ReadSubnets
SubnetApi updateSubnet POST /UpdateSubnet
SubregionApi readSubregions POST /ReadSubregions
TagApi createTags POST /CreateTags
TagApi deleteTags POST /DeleteTags
TagApi readTags POST /ReadTags
TaskApi deleteExportTask POST /DeleteExportTask
VirtualGatewayApi createVirtualGateway POST /CreateVirtualGateway
VirtualGatewayApi deleteVirtualGateway POST /DeleteVirtualGateway
VirtualGatewayApi linkVirtualGateway POST /LinkVirtualGateway
VirtualGatewayApi readVirtualGateways POST /ReadVirtualGateways
VirtualGatewayApi unlinkVirtualGateway POST /UnlinkVirtualGateway
VirtualGatewayApi updateRoutePropagation POST /UpdateRoutePropagation
VmApi createVms POST /CreateVms
VmApi deleteVms POST /DeleteVms
VmApi readAdminPassword POST /ReadAdminPassword
VmApi readConsoleOutput POST /ReadConsoleOutput
VmApi readVmTypes POST /ReadVmTypes
VmApi readVms POST /ReadVms
VmApi readVmsState POST /ReadVmsState
VmApi rebootVms POST /RebootVms
VmApi startVms POST /StartVms
VmApi stopVms POST /StopVms
VmApi updateVm POST /UpdateVm
VolumeApi createVolume POST /CreateVolume
VolumeApi deleteVolume POST /DeleteVolume
VolumeApi linkVolume POST /LinkVolume
VolumeApi readVolumes POST /ReadVolumes
VolumeApi unlinkVolume POST /UnlinkVolume
VolumeApi updateVolume POST /UpdateVolume
VpnConnectionApi createVpnConnection POST /CreateVpnConnection
VpnConnectionApi createVpnConnectionRoute POST /CreateVpnConnectionRoute
VpnConnectionApi deleteVpnConnection POST /DeleteVpnConnection
VpnConnectionApi deleteVpnConnectionRoute POST /DeleteVpnConnectionRoute
VpnConnectionApi readVpnConnections POST /ReadVpnConnections
VpnConnectionApi updateVpnConnection POST /UpdateVpnConnection

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

ApiKeyAuthSec

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

BasicAuth

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

[email protected]