GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
VM::EC2::BlockDevice::Attachment(3) User Contributed Perl Documentation VM::EC2::BlockDevice::Attachment(3)
 

VM::EC2::BlockDevice::Attachment - Object describing the attachment of an EBS volume to an instance

  use VM::EC2;
  $ec2         = VM::EC2->new(...);
  $volume      = $ec2->describe_volumes(-volume_id=>'vol-12345');
  $attachment  = $ec2->attachment;
  $volId       = $attachment->volumeId;
  $device      = $attachment->device;
  $instanceId  = $attachment->instanceId;
  $status      = $attachment->status;
  $time        = $attachment->attachTime;
  $delete      = $attachment->deleteOnTermination;
  $attachment->deleteOnTermination(1); # change delete flag

This object is used to describe the attachment of an Amazon EBS volume to an instance. It is returned by VM::EC2::Volume-> attachment().

The following object methods are supported:
 volumeId         -- ID of the volume.
 instanceId       -- ID of the instance
 status           -- Attachment state, one of "attaching", "attached",
                     "detaching", "detached".
 attachTime       -- Timestamp for when volume was attached
 deleteOnTermination -- True if the EBS volume will be deleted when its
                     attached instance terminates. Note that this is a
                     Perl true, and not the string "true".
The deleteOnTermination method is slightly more sophisticated than the result from the standard AWS API because it returns the CURRENT deleteOnTermination flag for the attachment, which might have been changed by VM::EC2-> modify_instance_attributes(). You may also change the deleteOnTermination state by passing a boolean argument to the method:
  $attachment->deleteOnTermination(1);
In addition, this class provides several convenience functions:

Returns the VM::EC2::Instance corresponding to this attachment.

Returns the VM::EC2::Volume object corresponding to this attachment.

Alias for device() to be compatible with VM::EC2::BlockDevice::Mapping call.

Change the deleteOnTermination flag on this attachment.

Refreshes the information in the object and returns status().

Calls AWS to refresh the attachment information.

When used in a string context, this object will interpolate into a string of the format "volumeId=>instanceId".

VM::EC2 VM::EC2::Generic VM::EC2::Instance VM::EC2::Volume

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.
2019-01-01 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.