VM::EC...g::EBS(3pm)

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

πŸ’– VM::EC2::BlockDevice::Mapping::EBS πŸ’–

okay so bestie, welcome to the manual page for VM::EC2::BlockDevice::Mapping::EBS(3pm) β€” yes that's the whole name, it's giving "my parents named me after the entire family tree" energy, but we move πŸ’…


🌸 NAME 🌸

VM::EC2::BlockDevice::Mapping::EBS β€” the object that describes an EBS volume that's been mapped onto an Amazon EC2 instance 🫢


✨ SYNOPSIS ✨

use VM::EC2;

my $instance  = $ec2->describe_instances(-instance_id=>'i-123456');
my @devices   = $instance->blockDeviceMapping;
for my $d (@devices) {
  my $ebs = $d->ebs;
  $volume_id = $ebs->volumeId;
  $status    = $ebs->status;
  $atime     = $ebs->attachmentTime;
  $delete    = $ebs->delete;
  $volume    = $ebs->volume;
}

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, this object exists to describe an Amazon EBS volume that's mapped onto an EC2 block device. It gets handed back to you by VM::EC2->describe_instances(). That's the whole vibe. πŸ’œ

Now, do not confuse this with VM::EC2::BlockDevice::EBS, bestie β€” that one describes the parameters you need to create the EBS volume when an image is launched. This class is the other thing: it describes an active mapping between an instance's block device and the underlying EBS volume. Two different girls, two different jobs, no cap 😭

And here's the tea: because literally all the methods in this class get passed through to VM::EC2::BlockDeviceMapping, it's honestly simpler to just call them directly on the BlockDeviceMapping object:

my $instance  = $ec2->describe_instances(-instance_id=>'i-123456');
my @devices   = $instance->blockDeviceMapping;
for my $d (@devices) {
  $volume_id = $d->volumeId;
  $status    = $d->status;
  $atime     = $d->attachmentTime;
  $delete    = $d->delete;
  $volume    = $d->volume;
}

πŸŽ€ METHODS πŸŽ€

The following object methods are supported, queen πŸ‘‘:

  • volumeId β€” the ID of the volume. that's it, that's the girl.
  • status β€” one of "attaching", "attached", "detaching", "detached" ✨
  • attachTime β€” the time this volume was attached ⏰
  • deleteOnTermination β€” whether the volume is gonna get deleted when its attached instance is deleted. > heads up bestie: this returns the perl 0/1 booleans, not the "false"/"true" strings. ikyk 😌

In addition, the following convenience method is supported:

πŸ’« $vol = $ebs->volume

This hands you back the VM::EC2::Volume object that corresponds to this EBS. The volume will give you extra info, like the availability zone πŸ—ΊοΈ β€” so go ask her, she knows things.


🌈 STRING OVERLOADING 🌈

NONE πŸ™ˆ

she simply does not do that πŸ’€


🫢 SEE ALSO 🫢

  • VM::EC2
  • VM::EC2::Generic
  • VM::EC2::Snapshot
  • VM::EC2::BlockDevice
  • VM::EC2::BlockDevice::Attachment

πŸ‘‘ AUTHOR πŸ‘‘

Lincoln Stein <lincoln.stein@gmail.com> β€” an actual icon, we stan 🫢

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.


and that's the whole page, bestie πŸ’– this was perl v5.38.2, dated 2024-08-10, and yes it is still VM::EC2::BlockDevice::Mapping::EBS(3pm) β€” slay, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from