VM::EC...nstance(3pm)
π VM::EC2::ReservedInstance π
okay so bestie, welcome to the manual page for VM::EC2::ReservedInstance β it's part of the User Contributed Perl Documentation and it's the lil object that describes an Amazon EC2 reserved instance. Yes, the real one, the one you actually paid for. Sit down, hydrate, let's go π«Ά
β¨ NAME β¨
VM::EC2::ReservedInstance β the object that describes an Amazon EC2 reserved instance. That's it, that's the name, she's iconic and she knows it π
πΈ SYNOPSIS πΈ
Here's the whole vibe in code, no cap:
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
yes the =head1 DESCRIPTION is literally sitting in there at the end, that's not me being quirky, that's just what the page says, so I kept it exactly π·
π¦ DESCRIPTION π¦
So basically? This object represents an Amazon EC2 reserved instance reservation that you have purchased, exactly as it comes back from VM::EC2->describe_reserved_instances(). It's your receipt, your whole entire situation, in object form β¨
π METHODS π
These object methods are supported, and honestly? A whole menu:
reservedInstancesIdβ the ID of this reserved instance contract πinstanceTypeβ the instance type that these reserved instances can be used on.availabilityZoneβ the availability zone where these reserved instances can be used.startβ the date and time that this contract was established.durationβ how long this contract lasts, in seconds.fixedPriceβ the purchase price of the reserved instance for the indicated version.usagePriceβ the usage price of the reserved instance, per hour.instanceCountβ how many instances 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β the tags for this reserved instance set. More conveniently accessed via thetags(),add_tags()anddelete_tags()methods.instanceTenancyβ the tenancy of the reserved instance (VPC only).currencyCodeβ the currency of the reserved instance offering prices.
Also! This object supports all the various tag manipulation methods described over in VM::EC2::Generic. On top of that, it supports these two extra cuties:
π« $status = $reserved_instance->current_status
Refreshes the object and hands you back its state β one of "payment-pending", "active", "payment-failed", and "retired". Use this to monitor the progress of a purchase, i.e. to anxiously refresh like it's a tracking number π¦
π« $reserved_instance->refresh
Calls VM::EC2->describe_reserved_instances() to refresh the object against the current information in Amazon. Glow-up, but for data π
π STRING OVERLOADING π
When used in a string context, this object will interpolate the reservedInstancesId. So if you just print her, you get her ID. Main character behaviour, fr fr π
β SEE ALSO β
Go read these too, they're all in the same friend group:
VM::EC2VM::EC2::GenericVM::EC2::ReservedInstances::Offering
π AUTHOR π
Lincoln Stein <lincoln.stein@gmail.com>.
Copyright (c) 2011 Ontario Institute for Cancer Research
This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty.
β οΈ real talk: that license + warranty bit is not a vibe, it's a legal vibe.LICENSEandDISCLAIMER.txtare the receipts, go read them.
and that's the whole page bestie, you ate it π
signing off with the footer deets: this is perl v5.38.2, dated 2024-08-10, and yes the page header still spells it VM::EC...nstance(3pm) because that's just how the manpage machine truncates things, no notes π β¨π¦π
π¦ where this page comes from
- debian trixie: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- ubuntu resolute: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- ubuntu stonking: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms