|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.aws.ec2.EC2Utils
public class EC2Utils
| Method Summary | ||
|---|---|---|
static void |
disableCompresssion()
Deprecated. |
|
static EC2Image |
getCurrentImage()
|
|
static String |
getEbsDeviceName(com.amazonaws.services.ec2.model.Image image)
|
|
static EC2Instance |
getLocalEC2Instance()
|
|
static List<com.amazonaws.services.ec2.model.IpPermission> |
getMatchingIpPermissions(com.amazonaws.services.ec2.model.SecurityGroup group,
Protocol protocol,
String cidrIpRange,
int port)
|
|
static
|
getUserData(Class<T> aClass)
Retrieves a serialised object from the EC2 user data for the current host. |
|
static boolean |
isWindows(com.amazonaws.services.ec2.model.Image image)
|
|
static void |
setUserData(com.amazonaws.services.ec2.model.LaunchSpecification launchSpecification,
Object userData)
AWS SDK variant for spot instances: Populates the user data of an EC2 with an object. |
|
static void |
setUserData(com.amazonaws.services.ec2.model.RunInstancesRequest runInstancesRequest,
Object userData)
AWS SDK variant for regular instances: Populates the user data of an EC2 with an object. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@NotNull
public static EC2Instance getLocalEC2Instance()
throws IOException
EC2Instance upon which the current JVM is hosted.
IOException - if necessary data could not be read.
public static void setUserData(@NotNull
com.amazonaws.services.ec2.model.LaunchSpecification launchSpecification,
@Nullable
Object userData)
throws IOException
launchSpecification - The launchSpecification to populateuserData - The object to serialise
IOException - If the object could not be serialised.
public static void setUserData(@NotNull
com.amazonaws.services.ec2.model.RunInstancesRequest runInstancesRequest,
@Nullable
Object userData)
runInstancesRequest - The launchSpecification to populateuserData - The object to serialise
IOException - If the object could not be serialised.
public static <T> T getUserData(Class<T> aClass)
throws IOException,
ClassNotFoundException
Retrieves a serialised object from the EC2 user data for the current host.
IOException - If the user data could not be read or deserialised.
ClassNotFoundException - If a required Class could not be found.
public static EC2Image getCurrentImage()
throws IOException
EC2Image upon which the current process is running.
IOException - If the EC2Image cannot be identified, possibly because the current process is not running in EC2.@Deprecated public static void disableCompresssion()
public static boolean isWindows(@NotNull
com.amazonaws.services.ec2.model.Image image)
@NotNull
public static List<com.amazonaws.services.ec2.model.IpPermission> getMatchingIpPermissions(@NotNull
com.amazonaws.services.ec2.model.SecurityGroup group,
@NotNull
Protocol protocol,
@Nullable
String cidrIpRange,
int port)
public static String getEbsDeviceName(@NotNull
com.amazonaws.services.ec2.model.Image image)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||