public void describeSpotPriceHistoryInRegion() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/describe_spot_price_history.xml"); Set<Spot> result = spotApi().describeSpotPriceHistoryInRegion(DEFAULT_REGION); assertEquals(result.size(), 3); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeSpotPriceHistory"); }
public void describeSpotInstanceRequestsInRegionWithFilter() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/describe_spot_instance.xml"); SpotInstanceRequest result = getOnlyElement(spotApi() .describeSpotInstanceRequestsInRegionWithFilter(DEFAULT_REGION, ImmutableMultimap.of("instance-id", "i-ef308e8e"))); assertEquals(result.getId(), "sir-1ede0012"); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeSpotInstanceRequests&Filter.1.Name=instance-id&Filter.1.Value.1=i-ef308e8e"); }
public void describeSpotPriceHistoryInRegionOptions() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/describe_spot_price_history.xml"); Date from = new Date(12345678910L); Date to = new Date(1234567891011L); Set<Spot> result = spotApi().describeSpotPriceHistoryInRegion(DEFAULT_REGION, from(from).to(to).productDescription("description").instanceType("m1.small")); assertEquals(result.size(), 3); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeSpotPriceHistory&StartTime=1970-05-23T21%3A21%3A18.910Z&EndTime=2009-02-13T23%3A31%3A31.011Z&ProductDescription=description&InstanceType.1=m1.small"); }