1VM::EC2::BlockDevice(3)User Contributed Perl DocumentatioVnM::EC2::BlockDevice(3)
2
3
4
6 VM::EC2::BlockDevice - Object describing how to construct an EC2 block
7 device when launching an image
8
10 use VM::EC2;
11
12 $ec2 = VM::EC2->new(...);
13 $image = $ec2->describe_images(-image_id=>'ami-123456');
14 my @devices = $image->blockDeviceMapping;
15 for my $d (@devices) {
16 my $virtual_device = $d->deviceName;
17 my $snapshot_id = $d->snapshotId;
18 my $volume_size = $d->volumeSize;
19 my $delete = $d->deleteOnTermination;
20 }
21
23 This object represents an Amazon block device associated with an AMI.
24 The information in it is used to create a new volume when the AMI is
25 launched. The object is returned by VM::EC2->describe_images().
26
27 Please see VM::EC2::Generic for methods shared by all VM::EC2 objects.
28
30 These object methods are supported:
31
32 deviceName -- name of the device, such as /dev/sda1
33 virtualName -- virtual device name, such as "ephemeral0"
34 noDevice -- true if no device associated
35 ebs -- parameters used to automatically set up Amazon EBS
36 volumes when an instance is booted. This returns
37 a VM::EC2::BlockDevice::EBS object.
38
39 For your convenience, a number of the ebs() object's methods are passed
40 through:
41
42 snapshotId -- ID of the snapshot used to create this EBS when an
43 instance is launched from this image.
44 volumeSize -- Size of the EBS volume (in gigs).
45 deleteOnTermination -- Whether this EBS will be deleted when the
46 instance terminates.
47 volumeType -- The volume type, one of "standard" or "io1"
48 iops -- The number of I/O operations per second that the volume
49 supports, an integer between 100 and 4000. Only valid for
50 volumes of type "io1".
51
53 When used in a string context, this object will be interpolated as:
54
55 deviceName=snapshotId:volumeSize:deleteOnTermination:volumeType:iops
56
57 The :iops portion is only valid when the volumeType is "io1".
58
59 e.g.
60
61 /dev/sdg=snap-12345:20:true:standard
62
63 This happens to be the same syntax used to specify block device
64 mappings in run_instances(). See VM::EC2.
65
67 VM::EC2 VM::EC2::Generic VM::EC2::BlockDevice
68 VM::EC2::BlockDevice::Attachment VM::EC2::BlockDevice::EBS
69 VM::EC2::Volume
70
72 Lincoln Stein <lincoln.stein@gmail.com>.
73
74 Copyright (c) 2011 Ontario Institute for Cancer Research
75
76 This package and its accompanying libraries is free software; you can
77 redistribute it and/or modify it under the terms of the GPL (either
78 version 1, or at your option, any later version) or the Artistic
79 License 2.0. Refer to LICENSE for the full license text. In addition,
80 please see DISCLAIMER.txt for disclaimers of warranty.
81
82
83
84perl v5.36.0 2023-01-20 VM::EC2::BlockDevice(3)