edu.columbia.cs.irt.sipcloud
Class AwsCenter
java.lang.Object
edu.columbia.cs.irt.sipcloud.AwsCenter
public class AwsCenter
- extends java.lang.Object
Welcome to your new AWS Java SDK based project!
This class is meant as a starting point for your console-based application that
makes one or more calls to the AWS services supported by the Java SDK, such as EC2,
SimpleDB, and S3.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AwsCenter
public AwsCenter()
init
public void init()
throws java.lang.Exception
- The only information needed to create a client are security credentials
consisting of the AWS Access Key ID and Secret Access Key. All other
configuration, such as the service endpoints, are performed
automatically. Client parameters, such as proxies, can be specified in an
optional ClientConfiguration object when constructing a client.
- Throws:
java.lang.Exception
- See Also:
BasicAWSCredentials
,
PropertiesCredentials
,
ClientConfiguration
fillVmList
public void fillVmList(java.util.List<VmElement> vmList)
addInstance
public VmElement addInstance(java.lang.String region,
java.lang.String type)
waitForInstanceReady
public boolean waitForInstanceReady(com.amazonaws.services.ec2.AmazonEC2 ec2,
java.lang.String instanceID)
removeInstance
public void removeInstance(VmElement e)
tagInstance
public void tagInstance(VmElement e)
updateSecurityGroup
public void updateSecurityGroup(VmElement cass)
getVMStatistic
public java.util.ArrayList<java.util.List<com.amazonaws.services.cloudwatch.model.Datapoint>> getVMStatistic(java.lang.String instanceID)
- Get VM Statistic with the given instance ID
- Parameters:
instanceID
- Amazon EC2 Instance ID
- Returns:
- Data String, which includes CPU, Network In, Network Out