VM::EC...nstance(3pm)

πŸ“¦
version 1.28 Β· 7 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 the 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.

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::EC2
  • VM::EC2::Generic
  • VM::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. LICENSE and DISCLAIMER.txt are 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