1VM::EC2::NetworkInterfaUcsee:r:ACtotnatcrhimbeuntte(d3V)PMe:r:lECD2o:c:uNmeetnwtoartkiIonnterface::Attachment(3)
2
3
4
6 VM::EC2::NetworkInterface::Attachment -- Object representing attachment
7 of a network interface to an instance
8
10 use VM::EC2;
11 my $ec2 = VM::EC2->new(...);
12 my $instance = $ec2->describe_instances('i-123456');
13 my @interfaces = $instance->network_interfaces();
14 for my $i (@interfaces) {
15 my $attachment = $i->attachment;
16 my $att_id = $attachment->attachmentId;
17 my $ins_id = $attachment->instanceId;
18 my $instance = $attachment->instance;
19 my $device = $attachment->device;
20 my $status = $attachment->status;
21 my $time = $attachment->attachmentTime;
22 my $delete = $attachment->deleteOnTermination;
23 }
24
26 This object describes the attachment of a elastic network interface
27 (ENI) to an instance, and allows you to manipulate the attachment.
28
29 Please see VM::EC2::Generic for methods shared by all VM::EC2 objects.
30
32 These object methods are supported:
33
34 attachmentId -- ID of the attachment
35 instanceId -- ID of the instance
36 instanceOwnerId -- ID of the owner of the instance
37 deviceIndex -- Ethernet device number, e.g. "0" for eth0
38 status -- Always "attached"; see below.
39 attachmentTime -- Time this ENI was attached to the instance, as a DateTime
40 deleteOnTermination -- If true, this ENI will be deleted when the instance terminates.
41
42 Amazon does not document the network interface attachment object well,
43 and many of these fields are inferred by inspection of EC2 REST
44 responses. In particular, the status field always seems to be
45 "attached", but there may be another state, such as "pending", which is
46 too short lived to be apparent.
47
48 In addition, this object supports the following convenience methods:
49
50 instance -- The VM::EC2::Instance to which the ENI is attached.
51
53 When used in a string context, this object will be interpolated as the
54 attachmentId.
55
57 VM::EC2 VM::EC2::Generic
58
60 Lincoln Stein <lincoln.stein@gmail.com>.
61
62 Copyright (c) 2012 Ontario Institute for Cancer Research
63
64 This package and its accompanying libraries is free software; you can
65 redistribute it and/or modify it under the terms of the GPL (either
66 version 1, or at your option, any later version) or the Artistic
67 License 2.0. Refer to LICENSE for the full license text. In addition,
68 please see DISCLAIMER.txt for disclaimers of warranty.
69
70
71
72perl v5.28.1 2019-V0M2:-:0E2C2::NetworkInterface::Attachment(3)