VM::EC2::ReservedInstance::Offering3pm
Object describing an amazon ec2 reserved instance offering
Usage
use VM::EC2;$ec2 = VM::EC2->new(...);@offerings = $ec2->describe_reserved_instances_offerings();for my $o (@offerings) {print $o->reservedInstancesOfferingId,"\n";print $o->instanceType,"\n";print $o->availabilityZone,"\n";print $o->duration,"\n";print $o->fixedPrice,"\n";print $o->usagePrice,"\n";print $o->productDescription,"\n";print $o->instanceTenancy,"\n";print $o->currencyCode,"\n";}# purchase the first one$offerings[0]->purchase() && print "offer purchased\n";
Overview
This object represents an Amazon EC2 reserved instance offering, as returned by VM::EC2->describe_reserved_instances_offerings.
Methods
These object methods are supported:
reservedInstancesOfferingId -- ID of this offerinstanceType -- The instance type on which this reservedinstance can be used.availabilityZone -- The availability zone in which this reservedinstance can be used.duration -- The duration of the reserved instance contract, in seconds.fixedPrice -- The purchase price of the reserved instance for the indicatedversion.usagePrice -- The usage price of the reserved instance, per hour.productDescription -- The reserved instance description. One of "Linux/UNIX","Linux/UNIX (Amazon VPC)", "Windows", and "Windows (AmazonVPC)"instanceTenancy -- The tenancy of the reserved instance (VPC only).currencyCode -- The currency of the reserved instance offering prices.
In addition, this object supports the purchase() method:
$boolean = $offering->purchase($count)
Purchases the offering and returns true on success. The optional $count argument specifies the number of reserved instances to purchase (default 1).
String overloading
When used in a string context, this object will interpolate the reservedInstancesOfferingId.
Releases
6 releases since Debian 8 (Jessie); the text changed 3 times.