1VM::EC2::ElasticAddressU(s3eprm)Contributed Perl DocumenVtMa:t:iEoCn2::ElasticAddress(3pm)
2
3
4
6 VM::EC2::ElasticAddress - Object describing an Amazon EC2 Elastic
7 Address
8
10 use VM::EC2;
11
12 $ec2 = VM::EC2->new(...);
13 $addr = $ec2->allocate_address;
14
15 $ip = $addr->publicIp;
16 $domain = $addr->domain;
17 $allId = $addr->allocationId;
18
20 This object represents an Amazon EC2 elastic address and is returned by
21 by VM::EC2->allocate_address().
22
24 These object methods are supported:
25
26 publicIp -- Public IP of the address
27 domain -- Type of address, either "standard" or "vpc"
28 allocationId -- For VPC addresses only, an allocation ID
29 instanceId -- If the address is associated with an instance, the
30 ID of that instance.
31 associationId -- If the address is a VPC elastic IP, and associated
32 with an instance, then the ID of the association.
33
34 In addition, the following convenience methods are provided:
35
36 $result = $addr->associate($instance_id)
37 Associate this address with the given instance ID or VM::EC2::Instance
38 object. If successful, the result code will be true for an ordinary EC2
39 Elastic IP,or equal to the associationId for a VPC Elastic IP address.
40
41 $result = $addr->disassociate()
42 Disassociate this address with any instance it is already associated
43 with. If successful, this method will return true.
44
45 $addr->refresh()
46 This is an internal function called after associate() and
47 disassociate(), and is used to refresh the address object's contents.
48
50 When used in a string context, this object will interpolate the
51 publicIp.
52
54 VM::EC2 VM::EC2::Generic VM::EC2::Instance
55
57 Lincoln Stein <lincoln.stein@gmail.com>.
58
59 Copyright (c) 2011 Ontario Institute for Cancer Research
60
61 This package and its accompanying libraries is free software; you can
62 redistribute it and/or modify it under the terms of the GPL (either
63 version 1, or at your option, any later version) or the Artistic
64 License 2.0. Refer to LICENSE for the full license text. In addition,
65 please see DISCLAIMER.txt for disclaimers of warranty.
66
67
68
69perl v5.38.0 2023-07-21 VM::EC2::ElasticAddress(3pm)