VM::EC2::ReservedInstance3pm
Object describing an amazon ec2 reserved instance
Usage
use VM::EC2;$ec2 = VM::EC2->new(...);@offerings = $ec2->describe_reserved_instances();for my $o (@offerings) {print $o->reservedInstancesId,"\n";print $o->instanceType,"\n";print $o->availabilityZone,"\n";print $o->start,"\n";print $o->duration,"\n";print $o->fixedPrice,"\n";print $o->usagePrice,"\n";print $o->instanceCount,"\n";print $o->productDescription,"\n";print $o->state,"\n";print $o->instanceTenancy,"\n";print $o->currencyCode,"\n";$tags = $o->tags;}=head1 DESCRIPTION
This object represents an Amazon EC2 reserved instance reservation that you have purchased, as returned by VM::EC2->describe_reserved_instances().
Methods
These object methods are supported:
reservedInstancesId -- ID of this reserved instance contractinstanceType -- The instance type on which these reservedinstance can be used.availabilityZone -- The availability zone in which these reservedinstances can be used.start -- The date and time that this contract was established.duration -- The duration of this contract, in seconds.fixedPrice -- The purchase price of the reserved instance for the indicatedversion.usagePrice -- The usage price of the reserved instance, per hour.instanceCount -- The number of instances that were purchased under this contract.productDescription -- The reserved instance description. One of "Linux/UNIX","Linux/UNIX (Amazon VPC)", "Windows", and "Windows (Amazon VPC)"state -- The state of the reserved instance purchase. One of "payment-pending","active", "payment-failed", and "retired".tagSet -- Tags for this reserved instance set. More conveniently accessed viathe tags(), add_tags() and delete_tags() methods.instanceTenancy -- The tenancy of the reserved instance (VPC only).currencyCode -- The currency of the reserved instance offering prices.
This object supports the various tag manipulation methods described in VM::EC2::Generic. In addition it supports the following methods:
$status = $reserved_instance->current_status
Refreshes the object and returns its state, one of "payment-pending", "active", "payment-failed", and "retired". You can use this to monitor the progress of a purchase.
$reserved_instance->refresh
Calls VM::EC2->describe_reserved_instances() to refresh the object against current information in Amazon.
String overloading
When used in a string context, this object will interpolate the reservedInstancesId.
Releases
6 releases since Debian 8 (Jessie); the text changed 3 times.