de.fzi.kadmos.cloud.aws
Class AWSAdapter

java.lang.Object
  extended by de.fzi.kadmos.cloud.aws.AWSAdapter

public class AWSAdapter
extends Object

Class hiding the communication with Amazon Web services via typica.

Since:
1.1.0
Version:
1.3.0
Author:
Carsten Daenschel

Constructor Summary
AWSAdapter(String AWSID, String AWSSEC)
          Creates a new AWSAdapter.
 
Method Summary
 String getGlobalDNS(String instanceID)
          Returns the global DNS of AMI with ID instance.
 String getLocalDNS(String instanceID)
          Returns the local DNS of AMI with ID instance.
 String startInstance(String imageID, String instanceType, String secGroup, String keyPair, String userdata)
          Starts one AWS instance.
 void terminateInstance(String id)
          Terminates the instance.
 void waitForInstanceToBoot(String id)
          Waits for the instance with specified ID to be in running state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWSAdapter

public AWSAdapter(String AWSID,
                  String AWSSEC)
Creates a new AWSAdapter.

Parameters:
AWSID - Access key ID
AWSSEC - Secret access key
Since:
1.1.0
Method Detail

startInstance

public String startInstance(String imageID,
                            String instanceType,
                            String secGroup,
                            String keyPair,
                            String userdata)
                     throws CloudException
Starts one AWS instance.

Parameters:
imageID - ID of the used image.
instanceType - Instance type (example: m1.small)
secGroup - Security group to be used.
keyPair - key pair to be used.
userdata - Data to be send to the instance
Returns:
The AWS ID of the started instance
Throws:
CloudException
Since:
1.1.0

waitForInstanceToBoot

public void waitForInstanceToBoot(String id)
                           throws CloudException
Waits for the instance with specified ID to be in running state.

Parameters:
id - ID of the instance to wait for.
Throws:
CloudException
Since:
1.1.0

terminateInstance

public void terminateInstance(String id)
                       throws CloudException
Terminates the instance.

Throws:
CloudException
Since:
1.1.0

getGlobalDNS

public String getGlobalDNS(String instanceID)
                    throws CloudException
Returns the global DNS of AMI with ID instance.

Throws:
CloudException
Since:
1.1.0

getLocalDNS

public String getLocalDNS(String instanceID)
                   throws CloudException
Returns the local DNS of AMI with ID instance.

Throws:
CloudException
Since:
1.1.0


Copyright © 2012. All Rights Reserved.