List of usage examples for com.amazonaws.services.ec2.model ReservedInstancesOffering getCurrencyCode
public String getCurrencyCode()
The currency of the Reserved Instance offering you are purchasing.
From source file:com.kenlin.awsec2offering.Offering.java
License:Open Source License
public Offering(ReservedInstancesOffering offering) { availabilityZone = offering.getAvailabilityZone(); offeringType = offering.getOfferingType(); instanceType = offering.getInstanceType(); productDescription = offering.getProductDescription(); currencyCode = offering.getCurrencyCode(); duration = offering.getDuration();//from w w w .ja v a 2 s. co m fixedPrice = offering.getFixedPrice(); try { hourlyPrice = offering.getRecurringCharges().get(0).getAmount(); } catch (IndexOutOfBoundsException e) { hourlyPrice = offering.getUsagePrice().doubleValue(); // e.g., c1.medium } /* totalMonthlyCost functionality has been offloaded to the client-side totalMonthlyCost = calculateTotalCost(duration, fixedPrice, hourlyPrice); */ }