blib/lib/VM/EC2/Spot/PriceHistory.pm untested

filter: Statementstmt 0.0% 0 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 12 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package VM::EC2::Spot::PriceHistory;
2 use strict;
3 use base 'VM::EC2::Generic';
4  
5 =head1 NAME
6  
7 VM::EC2::Spot::PriceHistory - Object describing an Amazon EC2 spot instance price history record
8  
9 =head1 SYNOPSIS
10  
11 use VM::EC2;
12  
13 $ec2 = VM::EC2->new(...);
14  
15 my @history = $ec2->describe_spot_price_history(-start_time => '2011-09-01T00:00:00',
16 -end_time => '2011-09-05T00:00:00',
17 -availability_zone => 'us-east-1a',
18 -instance_type => 'm1.small',
19 -filter => {'product-description'=>'*Linux*'},
20 } or die $ec2->error_str;
21 for my $h (@history) {
22 print join("\t",$h->timestamp,
23 $h->spot_price,
24 $h->instanceType,
25 $h->productDescription,
26 $h->availability_zone),"\n";
27 }
28  
29 =head1 DESCRIPTION
30  
31 This object represents an Amazon EC2 spot instance price history record,
32 and is returned by VM::EC2->describe_spot_price_history().
33  
34 =head1 METHODS
35  
36 These object methods are supported:
37  
38 instanceType -- Instance type, e.g. 'm1.small'
39 productDescription -- Product description, e.g. "windows"
40 spotPrice -- Price, in dollars per run-hour.
41 timestamp -- Timestamp of data point, in format yyyy-mm-ddThh:mm:ss.000Z
42 availabilityZone -- Availability zone of spot instance.
43  
44 =head1 SEE ALSO
45  
46 L<VM::EC2>
47 L<VM::EC2::Generic>
48  
49 =head1 AUTHOR
50  
51 Lincoln Stein E<lt>lincoln.stein@gmail.comE<gt>.
52  
53 Copyright (c) 2011 Ontario Institute for Cancer Research
54  
55 This package and its accompanying libraries is free software; you can
56 redistribute it and/or modify it under the terms of the GPL (either
57 version 1, or at your option, any later version) or the Artistic
58 License 2.0. Refer to LICENSE for the full license text. In addition,
59 please see DISCLAIMER.txt for disclaimers of warranty.
60  
61 =cut
62  
63 sub valid_fields {
64 my $self = shift;
65 return qw(instanceType productDescription spotPrice timestamp availabilityZone);
66 }
67  
68  
69 1;