List of usage examples for com.amazonaws.services.ec2.model RIProductDescription WindowsAmazonVPC
RIProductDescription WindowsAmazonVPC
To view the source code for com.amazonaws.services.ec2.model RIProductDescription WindowsAmazonVPC.
Click Source Link
From source file:com.kenlin.awsec2offering.App.java
License:Open Source License
/** * A URI-appropriate EC2 product description parser. * /* www. ja v a 2s .c o m*/ * Note: The strings that RIProductDescription.fromValue accepts are not URI * appropriate as they have spaces, etc. * * @param value * @return */ public static String normalizeRIProductDescription(String value) { if (value == null) { return null; } else if (value.startsWith(LINUX_PREFIX)) { return value.endsWith(AMAZONVPC_SUFFIX) ? RIProductDescription.LinuxUNIXAmazonVPC.toString() : RIProductDescription.LinuxUNIX.toString(); } else if (value.startsWith(WINDOWS_PREFIX)) { return value.endsWith(AMAZONVPC_SUFFIX) ? RIProductDescription.WindowsAmazonVPC.toString() : RIProductDescription.Windows.toString(); } else { return RIProductDescription.fromValue(value).toString(); } }